Skip to content
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

allow use of += manipulation on __all__ when __all__ is a tuple #9479

Closed
tungol opened this issue Nov 18, 2024 · 1 comment
Closed

allow use of += manipulation on __all__ when __all__ is a tuple #9479

tungol opened this issue Nov 18, 2024 · 1 comment
Labels
as designed Not a bug, working as intended enhancement request New feature or request

Comments

@tungol
Copy link

tungol commented Nov 18, 2024

If you have a question about a behavior that you’re seeing in pyright, consider posting to the Pyright discussion forum.

Is your feature request related to a problem? Please describe.
I was attempting to add asyncio.__all__ to typeshed. There's a lot of differences depending on python version, but pyright complains for each instance of __all__ += ("foo",). See: python/typeshed#13038

Describe the solution you’d like
Pyright supports this if __all__ is a list instead of a tuple. Is it possible to support this for tuple as well?

@tungol tungol added the enhancement request New feature or request label Nov 18, 2024
@erictraut
Copy link
Collaborator

Pyright conforms to the typing specification with regard to the __all__ idioms that it accepts. If you think that the spec should be extended to support more idioms, you can make your argument in the typing forum, but I think it's unlikely that additional extensions will be made. Each additional idiom requires support from a wide breadth of tools in the Python ecosystem, so the bar is high for adding new ones. I recommend that you use one of the existing supported idioms.

@erictraut erictraut closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2024
@erictraut erictraut added the as designed Not a bug, working as intended label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
as designed Not a bug, working as intended enhancement request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants