-
Notifications
You must be signed in to change notification settings - Fork 766
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
PyLance import of inner packages works incorrectly #801
Comments
Curious, I think a tuple should work. If you go and edit the file to be a list, does it work? @erictraut Do you know off the top of your head if we are strict about it only being a list? |
We support lists and tuples. You can find a list of all supported idioms here. |
Thanks for the clarification. We'll have to look closer at this one, then. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
if you look at
|
Hm, this should be one of the patterns we support. |
ahh. in
|
But, |
No, this isn't a pattern we support. This example is using using a nested tuple expression within a tuple expression. |
Here's the specific set of patterns that we support: https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#library-interface So this would work: __all__ = ['connect', 'create_pool', 'Pool', 'Record', 'Connection']
__all__.extend(exceptions.__all__) |
Maybe I'm missing something but it's just parenthesis at the top level; it's functionally equivalent to |
At the point where we handle |
Sure. I was just surprised that this was one we didn't handle. |
This seems like a bug after I edit doens't work
works
where _base.all is
|
|
yup. thank you. i'm submitting a change to asyncpg |
Environment data
Expected behaviour
Actual behaviour
while it still can show that via inner class exceptions:
Code Snippet / Additional information
If we look at inner structure at asyncpg module (available at github here)
there is a mention of that class via all reference but with tuple, not list:
maybe that is the way of it is not working properly.
The text was updated successfully, but these errors were encountered: