Skip to content

Type checking / mypy #4

Description

@s-celles

Hello,

I'm not a specialist of type annotations in Python, but I noticed you are using them quite intensively in your code.

Maybe you should consider using mypy for statical type checking and add it to your CI pipeline.

mypy can run as a pytest plugin
https://pypi.org/project/pytest-mypy/
(if you consider moving out from unittest to pytest as tests runner)

You should also be aware of https://www.python.org/dev/peps/pep-0585/

Importing those from typing is deprecated. Due to PEP 563 and the intention to minimize the runtime impact of typing, this deprecation will not generate DeprecationWarnings. Instead, type checkers may warn about such deprecated usage when the target version of the checked program is signalled to be Python 3.9 or newer. It's recommended to allow for those warnings to be silenced on a project-wide basis.

The deprecated functionality will be removed from the typing module in the first Python version released 5 years after the release of Python 3.9.0.

Kind regards

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions