Skip to content

Add mypy type checking to CI#195

Closed
lavr wants to merge 2 commits intomasterfrom
fix/add-mypy-ci
Closed

Add mypy type checking to CI#195
lavr wants to merge 2 commits intomasterfrom
fix/add-mypy-ci

Conversation

@lavr
Copy link
Copy Markdown
Owner

@lavr lavr commented Mar 31, 2026

Summary

  • Configure mypy in setup.cfg with per-module overrides for known patterns (mixin classes, vendored code, optional deps)
  • Add targeted # type: ignore comments for safe false positives
  • Add tox -e typecheck environment
  • Add typecheck job to GitHub Actions CI

mypy passes clean on all 26 source files. Any new type error will now fail CI.

Test plan

  • mypy emails/ passes locally with 0 errors
  • import emails smoke test passes
  • CI passes

lavr added 2 commits March 31, 2026 17:44
Configure mypy in setup.cfg with per-module overrides:
- emails.message: suppress mixin pattern false positives
- emails.packages: ignore vendored DKIM code
- emails.backend.smtp.client: private smtplib attrs
- emails.template, emails.django: optional deps

Add targeted type: ignore comments for known safe patterns.
Add tox typecheck environment and CI job.

mypy now passes clean on 26 source files.
The global ignore_missing_imports does not suppress import-untyped
for inline imports. Add explicit per-module override for requests.
@lavr
Copy link
Copy Markdown
Owner Author

lavr commented Mar 31, 2026

Merged into #194 instead

@lavr lavr closed this Mar 31, 2026
@lavr lavr deleted the fix/add-mypy-ci branch April 2, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant