Consider recommending types-lxml instead of lxml-stubs in import-untyped hint
オープン
まだ誰も着手していません。
needs discussion
- 主要言語
- Python
- スター
- 20.6k
- フォーク
- 3.3k
- PR マージ指標
- PR 指標を取得中
説明
Bug Report
The import-untyped hint for lxml recommends installing lxml-stubs. The lxml-stubs README seems to recommend the types-lxml fork instead, though:
This repository contains external type annotations (see PEP 484) for the lxml package.
NOTE: It was superceded by the more complete and externally maintained types-lxml fork.
It seems better to recommend types-lxml to users, but it might be more risky for use with --install-types because it is a third-party package.
To Reproduce
import lxml
Actual Behavior
a.py:1: error: Library stubs not installed for "lxml" [import-untyped]
a.py:1: note: Hint: "python3 -m pip install lxml-stubs"
a.py:1: note: (or run "mypy --install-types" to install all missing stub packages)
a.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Your Environment
- Mypy version used: 1.18.2 and 45aa599
- Mypy command-line flags: N/A
- Mypy configuration options from
mypy.ini(and other config files): N/A - Python version used: 3.13.7
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず import-untyped ヒントと、推奨されるスタブパッケージへのマッピングの実装およびテストを見つけます。lxml の例を再現し、types-lxml を推奨する場合と lxml-stubs を推奨する場合の意味を比較し、パッケージの選択が決まったら動作とテストを更新します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100