Mypy suggests `types-Pygments` but `--install-types` doesn't install it
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 20.6k
- Forks
- 3.3k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
Bug Report
(A clear and concise description of what the bug is.)
See below.
To Reproduce
Do from pygments.lexers import ....
mypy file.py would gives:
(3.14) ➜ git: mypy .
error: Library stubs not installed for "pygments.lexers" [import-untyped]
note: Hint: "python3 -m pip install types-Pygments"
note: (or run "mypy --install-types" to install all missing stub packages)
note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
error: Library stubs not installed for "pygments" [import-untyped]
Normally for other packages I would fix by mypy --install-types [--non-interactive] ..
But it doesn't install types-Pygments despite mypy knowing that this stub is missing.
# Ideally, a small sample program that demonstrates the problem.
# Or even better, a reproducible playground link https://mypy-play.net/ (use the "Gist" button)
Expected Behavior
Actual Behavior
Your Environment
- Mypy version used: mypy 1.19.1 (compiled: yes)
- Mypy command-line flags: See above
- Mypy configuration options from
mypy.ini(and other config files): No - Python version used: Python 3.14.3
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, den gemeldeten Fehler bei mypy . mit from pygments.lexers import ... zu reproduzieren, und verfolge dann den Pfad --install-types --non-interactive, der das fehlende Paket types-Pygments behandelt. Fertig ist die Aufgabe, wenn der Befehl das vorgeschlagene Stub-Paket installiert und die gemeldeten Diagnosen zu fehlenden Stubs nicht mehr auftreten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 55/100