Skip to content

chore: fix all mypy errors and add typecheck to CI#119

Merged
privateip merged 1 commit intoitential:develfrom
privateip:chore/support-typechecking
Mar 18, 2026
Merged

chore: fix all mypy errors and add typecheck to CI#119
privateip merged 1 commit intoitential:develfrom
privateip:chore/support-typechecking

Conversation

@privateip
Copy link
Member

  • Refactor logging.py to define TRACE/FATAL/NONE as module-level constants before assigning to the stdlib logging module, reducing type: ignore comments from 12 to 3 targeted suppressions
  • Fix Callable annotation bug in heuristics.py add_pattern (missing return type) and extract _make_redaction_func helper to give mypy an inferable typed closure
  • Add None guard before add_pattern call and assert on _default_redactions to resolve union-attr and arg-type errors in heuristics.py
  • Suppress http.py try/except HTTPMethod import conflict with targeted attr-defined and no-redef ignores
  • Add type: ignore[misc] to TYPE_CHECKING class definitions in platform.py and gateway.py where MRO causes attribute type conflicts
  • Add make typecheck target and wire it into make ci and the quality job in ci.yaml so static analysis runs on every PR

@privateip privateip requested a review from a team as a code owner March 18, 2026 11:02
- Refactor logging.py to define TRACE/FATAL/NONE as module-level constants
  before assigning to the stdlib logging module, reducing type: ignore
  comments from 12 to 3 targeted suppressions
- Fix Callable annotation bug in heuristics.py add_pattern (missing return
  type) and extract _make_redaction_func helper to give mypy an inferable
  typed closure
- Add None guard before add_pattern call and assert on _default_redactions
  to resolve union-attr and arg-type errors in heuristics.py
- Suppress http.py try/except HTTPMethod import conflict with targeted
  attr-defined and no-redef ignores
- Add type: ignore[misc] to TYPE_CHECKING class definitions in platform.py
  and gateway.py where MRO causes attribute type conflicts
- Add make typecheck target and wire it into make ci and the quality job
  in ci.yaml so static analysis runs on every PR
@privateip privateip force-pushed the chore/support-typechecking branch from 05b76b9 to 2833ab7 Compare March 18, 2026 11:14
@privateip privateip merged commit 5572881 into itential:devel Mar 18, 2026
6 checks passed
@privateip privateip deleted the chore/support-typechecking branch March 18, 2026 11:15
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