Skip to content

Mypy daemon suggests using "mypy --install-types" but it doesn't work #10015

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

Closed
JukkaL opened this issue Feb 3, 2021 · 3 comments · Fixed by #10508
Closed

Mypy daemon suggests using "mypy --install-types" but it doesn't work #10015

JukkaL opened this issue Feb 3, 2021 · 3 comments · Fixed by #10508
Assignees
Labels
bug mypy got something wrong priority-0-high topic-daemon dmypy

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented Feb 3, 2021

Here's what happened:

$ dmypy run -- t/t.py
Daemon started
t/t.py:1: error: Library stubs not installed for "requests" (or incompatible with Python 3.8)
t/t.py:1: note: Hint: "python3 -m pip install types-requests"
t/t.py:1: note: (or run "mypy --install-types" to install all missing stub packages)
t/t.py:1: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 22 source files)
$ mypy --install-types
Error: no mypy cache directory (you must enable incremental mode)

We should either make --install-types work with the daemon or not suggest using it when using the daemon.

@JukkaL JukkaL added bug mypy got something wrong priority-0-high topic-daemon dmypy labels Feb 3, 2021
@JukkaL JukkaL self-assigned this Feb 3, 2021
@KantiCodes
Copy link

KantiCodes commented Feb 17, 2021

Experiencing the same problem within the VS code when running
image

any news on the workaround/solution?

@JelleZijlstra
Copy link
Member

@KantiCodes you're probably using a version of mypy that doesn't support the new option yet.

@KantiCodes
Copy link

@JelleZijlstra thanks a lot :)

JukkaL added a commit that referenced this issue May 19, 2021
It doesn't work with mypy daemon.

Fixes #10015.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong priority-0-high topic-daemon dmypy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants