MT012: AuthorEmail
Overview
| Property | Value |
|---|---|
| ID | MT012 |
| Name | AuthorEmail |
| Group | metadata |
| Severity | NOTE |
Description
Checks that at least one author or maintainer has an email address defined in pyproject.toml.
Having a contact email helps users report issues, ask questions, and allows package indexers to notify maintainers about security vulnerabilities or policy changes.
What it checks
The check validates that at least one author or maintainer has an email:
- Reads the
authorsfield from[project] - Reads the
maintainersfield from[project] - Passes if any author or maintainer entry has an
emailkey with a value
Why it matters
- User Support - Users can contact maintainers about bugs or questions
- Security Notifications - PyPI and security scanners can notify you of vulnerabilities
- Package Indexing - Some package indexes require or prefer contact information
- Community Engagement - Makes it easier for potential contributors to reach out
- Professional Appearance - Shows the project is actively maintained
How to fix
Add an email address to at least one author or maintainer in pyproject.toml:
[project]
name = "my-package"
version = "1.0.0"
authors = [
{name = "John Doe", email = "john@example.com"}
]Or with maintainers:
[project]
maintainers = [
{name = "Jane Doe", email = "jane@example.com"}
]You can also have multiple authors where at least one has an email:
[project]
authors = [
{name = "John Doe"},
{name = "Jane Doe", email = "jane@example.com"}
]Best practices
- Use a monitored email address that won’t go stale
- Consider using a project-specific email or mailing list for larger projects
- Keep the email updated when maintainership changes
Configuration
Skip this check
[tool.pycmdcheck]
skip = ["MT012"]CLI
pycmdcheck --skip MT012