Skip to content

Explicitly declare supported public APIs with '__all__' #1099

Description

@sungwy

Feature Request / Improvement

Currently, we rely on the informal naming conventions (with or without underscore) to distinguish between a public or private API.

It will be helpful to declare the names of public APIs in the __all__ attribute on all our public API supporting modules as it will:

  • control what APIs we expose to wildcard imports
  • enhance discoverability of public APIs (when reading the source code as users or developers)
  • and allow tools like Griffe to detect the correct public APIs for backwards compatibility analysis in our CI

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions