Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Stop suggesting MYPYPATH on missing imports #5950
This pull request replaces the "Perhaps setting MYPYPATH..." note with a link to https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
It also updates the docs to make that page a little more actionable: it now clearly distinguishes between different scenarios a user might find themselves in and gives concrete steps to try for each case.
It also modifies the docs to suggest that users try searching for or writing their stubs first and try silencing errors second.
@gvanrossum -- thanks for the feedback! I made all of the changes you suggested, except for the one about adding an example of a stubs package. There's some discussion about this on gitter, but the long and short of it was that I wasn't really able to find an example of a PEP 561 stubs package I felt entirely comfortable using.
I'm thinking of waiting until sqlalchemy-stubs is published on PyPI and submitting a PR that uses that as an example. Alternatively, I could submit a PR to typeshed or something containing a list of PEP 561 packages and link to that instead? That might require more coordination with @ethanhs + the typeshed folks though.