8000 Stop suggesting MYPYPATH? · Issue #5241 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content
Stop suggesting MYPYPATH? #5241
Closed
Closed
@gvanrossum

Description

@gvanrossum

Currently whenever mypy fails to find an import it prints a note suggesting to set MYPYPATH, e.g.:

main:1: error: Cannot find module named 'a.b.c'
main:1: note: (Perhaps setting MYPYPATH or using the "--ignore-missing-imports" flag would help)

In most cases setting MYPYPATH is an anti-pattern, since the issue is likely that this is a third-party module for which no stubs exist in typeshed (nor anywhere else). We used to see a lot of problems when people added site-packages to MYPYPATH.

Maybe we can add a more nuanced explanation to the docs and link to the docs from the note instead?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0