Closed tungol closed 1 week ago
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.
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: https://github.com/python/typeshed/pull/13038Describe 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?