Consider recommending types-lxml instead of lxml-stubs in import-untyped hint
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 20.6k
- Fork
- 3.3k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia individuando l’implementazione e i test per l’indicazione import-untyped e la relativa mappatura consigliata dei pacchetti stub. Riproduci l’esempio lxml, confronta le implicazioni della raccomandazione di types-lxml rispetto a lxml-stubs e aggiorna il comportamento e i test una volta deciso il pacchetto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 52/100