Python stub files good practices

Viewed 252

When developing python packages – I think – is quite good practice to use type hints. To make things cleaner I have decided to use Python's .pyi stub files. Since my package contains some sub-packages, should I put stub declarations inside each sub-module (which to me seems the best option) or should I put them in the main __init__.pyi of the whole package, as NumPy does?

0 Answers
Related