dmypy: Line number disappears when invoking multiple times
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 20.6k
- Fork
- 3.3k
- Merge medio
- 1g 18h
- PR unite (30g)
- 54
Descrizione
Bug Report
% dmypy restart
Daemon stopped
Daemon started
% dmypy run lib/testlib.py
lib/testlib.py:46: error: Unexpected attribute "xxxx" for model "Xxxx"
lib/testlib.py:142: error: The return type of a generator function should be "Generator" or one of its supertypes
Found 2 errors in 1 file (checked 945 source files)
% dmypy run lib/testlib.py
lib/testlib.py: error: The return type of a generator function should be "Generator" or one of its supertypes
lib/testlib.py:46: error: Unexpected attribute "xxxx" for model "Xxxx"
Found 2 errors in 1 file (checked 1 source file)
Note in the 2nd invocation lib/testlib.py: error: The return type of a generator function no longer has a line number.
To Reproduce
I tried reducing this to a smaller example, but failed to reproduce it that way. :(
Your Environment
- Mypy version used: 0.942
- Mypy command-line flags: (none)
- Mypy configuration options from
mypy.ini(and other config files): I can reproduce this when I delete mypy config of my project - Python version used: 3.10.2
- Operating system and version: macOS
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 eseguendo i due comandi consecutivi dmypy run lib/testlib.py dopo dmypy restart, usando la configurazione Python 3.10.2 indicata e senza configurazione di mypy. Confronta le diagnostiche per lib/testlib.py, in particolare l’errore del generatore che perde il numero di riga alla seconda esecuzione. Il lavoro è completato quando le invocazioni ripetute mantengono il numero di riga preservando al contempo l’output diagnostico esistente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- cli, tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100