Preferred location for Python stub files

Viewed 85

Is there a commonly agreed upon location for stub files in a Python project?

It seems that the consensus would be to just place them in the same directory as the modules they are annotating - but this seems too messy and unorganised for Python.

I have no luck in navigating code in Pycharm when stubs are placed alongside their corresponding modules as I will be directed to the stub and not the object I am looking for.

I find having them in an isolated directory works best for me so I can mark them as sources root when needed. I don't know if this could lead to compatibility issues or just make using them a waste of time altogether.

I haven't found anything definitive in the PEP... maybe I've missed something.

Cheers.

0 Answers
Related