Closed intgr closed 4 months ago
This py.typed
is new for me. Reading the docs, I felt that marking the stubs as "partial" can be beneficial. What do you think? https://peps.python.org/pep-0561/#partial-stub-packages
Many stub packages will only have part of the type interface for libraries completed, especially initially. For the benefit of type checking and code editors, packages can be “partial”.
If a stub package distribution is partial it MUST include partial\n in a py.typed file.
"Partial" is not relevant for us. I covered all modules in the rest_framework_nested
package. Mypy's disallow_incomplete_defs and disallow_untyped_defs should ensure that untyped definitions can't be added.
Also I think it's for stub packages only (those that provide only .pyi
files).
PEP 561 requires typehinted projects to include a
py.typed
file, for typecheckers to recognize the hints.https://peps.python.org/pep-0561/#packaging-type-information