-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
pyright tests: doesn't support __getattr__
for resolving submodules
#5598
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
Comments
Can you point to a specific example? On initial investigation, it looks like |
I blame my morning tiredness for missing the |
Pyright doesn't currently apply the module-level |
Suppose a stub does |
The good news is that the |
This likely negatively affects the new PIL stubs (#5594); in the ones I wrote that ship with Pylance (https://github.com/microsoft/python-type-stubs/tree/main/PIL), I made the stub In general, we assume that stub packages that aren't partial to be complete, including that a given module doesn't exist. The import resolver doesn't really have access to the analysis info like "this file is marked as incomplete via a |
__getattr__
for resolving submodules
(retitled the issue to be more specific, feel free to change if I misunderstood what's going on here) |
I'm not sure this is still a problem. If it is, we can always open a new issue. |
Example:
stubs/paramiko/paramiko/kex_ecdh_nist.pyi
contains imports fromcryptography
, but pyright can't findcryptograpy
, probably because it's "hidden" instubs/cryptography
. Cc @erictraut and @jakebailey: Do you have any ideas how we could fix this?The text was updated successfully, but these errors were encountered: