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

Clarify stub-only packages need to be installed #9958

Merged
merged 2 commits into from Jan 16, 2022

Conversation

@gustavgransbo
Copy link
Contributor

@gustavgransbo gustavgransbo commented Jan 24, 2021

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.

@97littleleaf11 97littleleaf11 added this to Waiting for review in mypy Nov 25, 2021
Copy link
Collaborator

@JukkaL JukkaL left a comment

Thanks for the PR! I have one suggestion.

docs/source/running_mypy.rst Outdated Show resolved Hide resolved
@gustavgransbo gustavgransbo requested a review from JukkaL Dec 3, 2021
@97littleleaf11 97littleleaf11 merged commit 5f39f5d into python:master Jan 16, 2022
1 check passed
mypy automation moved this from Docs: Waiting for review to Done Jan 16, 2022
@gustavgransbo gustavgransbo deleted the docs-stub-only-package branch Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
mypy
Done
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants