-
Notifications
You must be signed in to change notification settings - Fork 258
Need a standard for searching stub files #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Milestone
Comments
Reported to PyCharm as https://youtrack.jetbrains.com/issue/PY-18597 |
PEP 484 already specifies how tools should handle search path:
However the PEP doesn't specify two things:
|
PyCharm 2017.1 EAP builds now always prefer stub files over Python files found on the Python path. |
I think the remaining questions here were standardized by PEP 561, so this can be closed now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From python/mypy#1190 (comment):
We just encountered an issue here where there's a discrepancy between the way PyCharm and mypy search for stubs. In this case it was about an extension module, for which the user had created a stub file (but not added it to typeshed). Mypy found it fine on the default module search path. But PyCharm would only find it if there was a corresponding .py file in the same directory. In their case the fix was to add a .py file that simple re-exported the extension module. But it would be nice to have some kind of standardization for this.
The text was updated successfully, but these errors were encountered: