Skip to content

Question: Why not *-stubs but types-* in typeshed? #7434

Closed

Description

@eggplants

As the title says. Is the reason simply to make a distinction?


Ref:

https://mypy.readthedocs.io/en/stable/installed_packages.html#using-installed-packages-with-mypy-pep-561

As many packages don’t support type checking yet, you may also have to install a separate stub package, usually named types-<library>.

https://mypy.readthedocs.io/en/stable/installed_packages.html#creating-pep-561-compatible-packages

If the package is stub-only (not imported at runtime), the package should have a prefix of the runtime package name and a suffix of -stubs.

Activity

  1. hauntsaninja commented on Mar 4, 2022

    @hauntsaninja
    Collaborator

    Most of this history here is on #2491
    I seem to remember one consideration was PyPA creating namespaces in the future, which is why we went with a prefix.

  2. eggplants commented on Mar 4, 2022

    @eggplants
    ContributorAuthor

    Thank you for your answer!

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions