Skip to content

IMPR: Type annotations #1266

@d-v-b

Description

@d-v-b

The codebase currently lacks type hints. Adding type hints would greatly increase the ability for static type checkers like mypy to enforce type-safety and catch bugs at type-checking time.

Adding mypy or an equivalent type checker to pre-commit would help maintain type-safety during the development process.

Operationally, I would suggest adding a type checker like mypy to the pre-commit configuration, but exempting all modules from type checking (because they would all fail).

One by one, modules would be added to mypy's scope, and that module would receive complete type annotations. This should be a safe way to gradually type the entire codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIndicates new improvementstriageIndicates issues, pull requests, or discussions need to be reviewed for the first time

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions