Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
eggplants opened this issue Mar 4, 2022 · 2 comments
Closed

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

eggplants opened this issue Mar 4, 2022 · 2 comments

Comments

@eggplants
Copy link
Contributor

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.

@hauntsaninja
Copy link
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.

@eggplants
Copy link
Contributor Author

Thank you for your answer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants