I have been writing something and it involves accessing the __all__ attribute of the __future__ module. Pylance, the type checker program I am using, complained that __all__ is not a known member of the __future__ module. I reported the issue to the Pylance project, and the developer replied that Pylance followed the typeshed repository for type information in stdlib modules. It seems that the missing of the __all__ attribute in the __future__.pyi stub is the root cause.
I must admit that I am not sure what should be included into type stub and what should not. Especially after seeing two pull requests (#3357 and #2161) removing __all__ from stubs, I am not sure whether we should add the __all__ attribute to __future__.pyi or not?
I have been writing something and it involves accessing the
__all__attribute of the__future__module. Pylance, the type checker program I am using, complained that__all__is not a known member of the__future__module. I reported the issue to the Pylance project, and the developer replied that Pylance followed the typeshed repository for type information in stdlib modules. It seems that the missing of the__all__attribute in the__future__.pyistub is the root cause.I must admit that I am not sure what should be included into type stub and what should not. Especially after seeing two pull requests (#3357 and #2161) removing
__all__from stubs, I am not sure whether we should add the__all__attribute to__future__.pyior not?