Skip to content

chore(mypy): enable stricter type checking flags - #731

Merged
Aidan Holland (thehappydinoa) merged 1 commit into
mainfrom
chore/tighten-mypy
Aug 28, 2026
Merged

chore(mypy): enable stricter type checking flags#731
Aidan Holland (thehappydinoa) merged 1 commit into
mainfrom
chore/tighten-mypy

Conversation

@thehappydinoa

@thehappydinoa Aidan Holland (thehappydinoa) commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

Enables 8 mypy flags that pass with zero code changes (plus one stale # type: ignore removal):

Flag Purpose
warn_unused_configs Catch dead mypy config
warn_redundant_casts Remove unnecessary cast() calls
warn_unused_ignores Remove stale # type: ignore comments
strict_equality Catch always-true/false == comparisons
extra_checks Additional correctness checks
no_implicit_reexport Exports must be explicit
check_untyped_defs Type-check bodies of untyped functions
disallow_untyped_decorators Decorators must be typed

Skipped --disallow-incomplete-defs and --disallow-untyped-defs (297 errors) — those are a future PR with annotation work.

Test plan

  • uv run mypy censys — no issues in 47 source files
  • 459 tests pass, 100% coverage

🤖 Generated with Claude Code

Enables 8 flags that pass with zero errors:
- warn_unused_configs / warn_redundant_casts / warn_unused_ignores
- strict_equality / extra_checks / no_implicit_reexport
- check_untyped_defs / disallow_untyped_decorators

Also removes a stale `# type: ignore[override]` in certs.py that
was flagged by warn_unused_ignores.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thehappydinoa
Aidan Holland (thehappydinoa) merged commit d69e9a2 into main Aug 28, 2026
12 checks passed
@thehappydinoa
Aidan Holland (thehappydinoa) deleted the chore/tighten-mypy branch August 28, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant