Skip to content

mypy 0.930 does not install types #11920

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
berislavlopac opened this issue Jan 6, 2022 · 5 comments
Closed

mypy 0.930 does not install types #11920

berislavlopac opened this issue Jan 6, 2022 · 5 comments
Labels
bug mypy got something wrong

Comments

@berislavlopac
Copy link

Bug Report

In version 0.930, mypy does not install type packages when run with --install-types.

To Reproduce

Run mypy on code that imports a library that has a separate typing package, e.g. dateutil, both with --install-types and without it.

Expected Behavior

The packages (types-python-dateutil in the example above) should be installed. With mypy 0.920 the message (when running mypy --install-types --non-interactive .) looks something like:

Installing missing stub packages:
python -m pip install types-python-dateutil

The behaviour without --install-types behaves as described in the previous section.

Actual Behavior

In version 0.930, running mypy both with and without --install-types is the same:

licensing/logic/license.py:17: error: Library stubs not installed for "dateutil" (or incompatible with Python 3.7)
licensing/logic/license.py:17: note: Hint: "python3 -m pip install types-python-dateutil"
licensing/logic/license.py:17: note: (or run "mypy --install-types" to install all missing stub packages)
licensing/logic/license.py:17: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
licensing/logic/license.py:18: error: Library stubs not installed for "dateutil.relativedelta" (or incompatible with Python 3.7)

Your Environment

  • Mypy version used: 0.930
  • Mypy command-line flags: --install-types
  • Python version used: 3.7
  • Operating system and version: Linux Ubuntu impish
@berislavlopac berislavlopac added the bug mypy got something wrong label Jan 6, 2022
@huyz
Copy link

huyz commented Jan 12, 2022

Hmm, I thought that was happening to me too, but I tried again and it worked for me, with versions 0.930, 0.931, and 0.910

@berislav-harbr
Copy link

0.931 is working fine for me too now 🤷‍♂️

@huyz
Copy link

huyz commented Jan 12, 2022

So close the issue?

@JelleZijlstra
Copy link
Member

There's a good chance this bug is dependent on the state of the cache, which might be why it no longer reproduces.

@hauntsaninja
Copy link
Collaborator

Closing, since there isn't a repro

@hauntsaninja hauntsaninja closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

5 participants