[Python-Dev] PEP 561: Distributing and Packaging Type Information (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Fri Oct 27 05:31:04 EDT 2017
- Previous message (by thread): [Python-Dev] PEP 561: Distributing and Packaging Type Information
- Next message (by thread): [Python-Dev] PEP 561: Distributing and Packaging Type Information
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 26 Oct 2017 15:42:19 -0700 Ethan Smith <ethan at ethanhs.me> wrote:
Stub Only Packages ''''''''''''''''''
For package maintainers wishing to ship stub files containing all of their type information, it is prefered that the
*.pyi
stubs are alongside the corresponding*.py
files. However, the stubs may be put in a sub-folder of the Python sources, with the same name the*.py
files are in. For example, theflyingcircus
package would have its stubs in the folderflyingcircus/flyingcircus/
. This path is chosen so that if stubs are not found inflyingcircus/
the type checker may treat the subdirectory as a normal package. The normal resolution order of checking*.pyi
before*.py
will be maintained.
I am not sure I understand the rationale for this. What would be the problem with looking for the stubs in a directory named, e.g; "flyingcircus/typing"?
Regards
Antoine.
- Previous message (by thread): [Python-Dev] PEP 561: Distributing and Packaging Type Information
- Next message (by thread): [Python-Dev] PEP 561: Distributing and Packaging Type Information
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]