Skip to content

Clarify stub-only packages need to be installed #9958

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

Merged
merged 2 commits into from
Jan 16, 2022

Conversation

gustavgransbo
Copy link
Contributor

Description

Reading the documentation about how imports are found, I was confused by the note:
"You cannot point to a PEP 561 package via the MYPYPATH, it must be installed (see PEP 561 support)".

I did not know what a PEP 561 package was, so I went to skim the documentation. This did not make me much wiser, since it describes multiple ways of distributing type hints, e.g. by providing the py.typed file. From PEP 561 support it seems like what is actually referred to is specifically stub-only packages (also introduced in PEP 561).

This PR changes the note to:
"You cannot point to a stub-only package via the MYPYPATH, it must be installed (see PEP 561 support)".

Test Plan

Rebuilding docs creates expected results.

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I have one suggestion.

@gustavgransbo gustavgransbo requested a review from JukkaL December 3, 2021 10:41
@97littleleaf11 97littleleaf11 merged commit 5f39f5d into python:master Jan 16, 2022
@gustavgransbo gustavgransbo deleted the docs-stub-only-package branch January 17, 2022 08:11
tushar-deepsource pushed a commit to DeepSourceCorp/mypy that referenced this pull request Jan 20, 2022
* Clarify stub-only packages need to be installed
* Add link to PEP 561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants