Description
A portion of the Python code base makes use of type annotations. The entire code base should do so, to reduce bugs, improve quality, and enhance the IDE experience.
Additional Details
Use one of the more common type checkers - mypy, pyright, or pyre - and enforce standards by adding the checker to QA as a pre-commit hook.
Consider adding this setting to the ruff config for isort:
[tool.ruff.isort]
force-sort-within-sections = true
required-imports = ["from __future__ import annotations"]
If the selected type checker does not offer a pre-commit hook directly, check the published pre-commit hooks site for a "mirrored" one (e.g., for mypy)
References
Acceptance Criteria
Description
A portion of the Python code base makes use of type annotations. The entire code base should do so, to reduce bugs, improve quality, and enhance the IDE experience.
Additional Details
Use one of the more common type checkers -
mypy,pyright, orpyre- and enforce standards by adding the checker to QA as a pre-commit hook.Consider adding this setting to the
ruffconfig forisort:If the selected type checker does not offer a
pre-commithook directly, check the publishedpre-commithooks site for a "mirrored" one (e.g., formypy)References
typinglibraryAcceptance Criteria
ruffrules forANN(flake8-annotations) are no longer disabledruffrules forTCH(flake8-type-checking) are no longer disabledruffrules forFA(flake8-future-annotations) are no longer disabled