Consider recommending types-lxml instead of lxml-stubs in import-untyped hint
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 20.6k
- Forks
- 3.3k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
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
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, die Implementierung und Tests für den Hinweis import-untyped und seine empfohlene Zuordnung zu Stub-Paketen zu finden. Stelle das lxml-Beispiel nach, vergleiche die Auswirkungen der Empfehlung von types-lxml gegenüber lxml-stubs, und aktualisiere Verhalten und Tests, sobald die Paketwahl feststeht.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 52/100