adamjstewart / fiscalyear

:calendar: Utilities for managing the fiscal calendar
MIT License
52 stars 13 forks source link

Type hints: PEP 561 compliance #30

Closed adamjstewart closed 2 years ago

adamjstewart commented 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:

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.