Skip to content

Apply typehints consistently across the code base #516

@ns-rse

Description

@ns-rse

Typehints (see PEP484) make it easier to read and understand code (by default the "type" of objects in Python is dynamically determined and can change, adding typehints clarifies intent). Newer code that has been developed includes typehints.

The MonkeyType tool can be used to determine and apply types across an existing code base and the pytest-monkeytype package facilitates applying this to existing code bases.

Once in place we can then introduce type checkers such as mypy into the pre-commit pipeline.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions