Mypy suggests `types-Pygments` but `--install-types` doesn't install it
オープン
まだ誰も着手していません。
bug
- 主要言語
- Python
- スター
- 20.6k
- フォーク
- 3.3k
- PR マージ指標
- PR 指標を取得中
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、from pygments.lexers import ... を使って報告された mypy . の失敗を再現し、次に不足しているパッケージ types-Pygments を処理する --install-types --non-interactive の経路を追跡します。コマンドが提案されたスタブパッケージをインストールし、報告されたスタブ不足の診断が発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 55/100