Closed adamjstewart closed 2 years ago
So even if a library has type hints, it turns out that mypy doesn't use them unless there is a py.typed file installed. According to PEP 561:
py.typed
This PEP does not support distributing typing information as part of module-only distributions or single-file modules within namespace packages. The single-file module should be refactored into a package and indicate that the package supports typing as described above.
This PEP does not support distributing typing information as part of module-only distributions or single-file modules within namespace packages.
The single-file module should be refactored into a package and indicate that the package supports typing as described above.
So it's necessary to refactor fiscalyear from a module to a package in order to support this. This change shouldn't even be noticed by users.
Also see the mypy docs on PEP 561 compliance.
So even if a library has type hints, it turns out that mypy doesn't use them unless there is a
py.typed
file installed. According to PEP 561:So it's necessary to refactor fiscalyear from a module to a package in order to support this. This change shouldn't even be noticed by users.
Also see the mypy docs on PEP 561 compliance.