Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce type checking #238

Open
6 tasks
maxrake opened this issue May 3, 2023 · 0 comments
Open
6 tasks

Enforce type checking #238

maxrake opened this issue May 3, 2023 · 0 comments
Assignees
Labels
low priority This should be addressed as time permits task Task/chore unrelated to a bug or feature request

Comments

@maxrake
Copy link
Contributor

maxrake commented May 3, 2023

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

  • All Python code is annotated with types
  • Type checking is enforced in QA
  • ruff rules for ANN (flake8-annotations) are no longer disabled
  • ruff rules for TCH (flake8-type-checking) are no longer disabled
  • ruff rules for FA (flake8-future-annotations) are no longer disabled
  • Documentation is updated
@maxrake maxrake added low priority This should be addressed as time permits task Task/chore unrelated to a bug or feature request labels May 3, 2023
@maxrake maxrake self-assigned this May 3, 2023
@maxrake maxrake mentioned this issue May 4, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low priority This should be addressed as time permits task Task/chore unrelated to a bug or feature request
Projects
None yet
Development

No branches or pull requests

1 participant