Mypy suggests `types-Pygments` but `--install-types` doesn't install it
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 20.6k
- Forks
- 3.3k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza reproduciendo el fallo notificado de mypy . con from pygments.lexers import ... y, a continuación, sigue la ruta --install-types --non-interactive que gestiona el paquete faltante types-Pygments. Se considera terminado cuando el comando instala el paquete de stubs sugerido y ya no aparecen los diagnósticos notificados de stubs faltantes.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- devtools
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 55/100