Skip to content

D1** not detecting names made public via import/__all__ idiom #16553

Open
@alicederyn

Description

@alicederyn

Summary

It's a common pattern to implement all one's code in private modules, and then have the top-level module export the names via from ._child import SomethingPublic and __all__ = ["SomethingPublic"]. This allows the code to be structured in a way that makes sense (small modules, helper functions grouped with the code that uses it), without that leaking out into the public API in a way which prevents restructuring later.

Unfortunately the D1** rules don't recognize this idiom, so don't flag up any missing documentation for libraries written this way. It would be great if that could be supported!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ruleImplementing or modifying a lint ruletype-inferenceRequires more advanced type inference.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions