I am writing a new library from scratch in Python, I would like to use Mypy for type checking. But I don't know if it's better to specify the types in the source code or in a stub file .
I see that projects like Django have a different repository with stubs (this project would merge with the original project when it's done), while others like Pandas have the types in the .
What would be better for maintainability? Why aren't contributors doing PR with types inside the Django code instead of a fork with stubs? Is there any good practice on this? I have read PEP 484 but it doesn't mention a preferred method or use cases.
From already thank you very much!