django-typed-models
django-typed-models copied to clipboard
Add type annotations
@craigds , I agree.
My understanding is that type stubs can be incrementally added to projects and distributed separately/independently from those projects. Looking into this, I found that it's not necessary to distribute stubs if you are willing to include type hints in the codebase: https://peps.python.org/pep-0561/#packaging-type-information
So if you're willing to include type hints in the codebase, that's preferable in my opinion.
We can add a file named py.typed to the source directory, and then that directory and its children should be analyzable by static type checkers.
Another reference: https://blog.whtsky.me/tech/2021/dont-forget-py.typed-for-your-typed-python-package/