Skip to content

Should we add the __all__ attribute to __future__.pyi? #5569

@MapleCCC

Description

@MapleCCC

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions