python / python/mypy

Mypy suggests `types-Pygments` but `--install-types` doesn't install it

オープン
#21,068 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、from pygments.lexers import ... を使って報告された mypy . の失敗を再現し、次に不足しているパッケージ types-Pygments を処理する --install-types --non-interactive の経路を追跡します。コマンドが提案されたスタブパッケージをインストールし、報告されたスタブ不足の診断が発生しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
devtools
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。