(🐞) Column marker for `for` target is wrong, it's where the `for` keyword is, not where the target is
Aperta
Nessuno ha ancora preso questa issue.
bug
- Lingua principale
- Python
- Stelle
- 20.6k
- Fork
- 3.3k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
from typing import Any
b: Any
for a in b:
...
if True:
for a in b:
...
Expected
> mypy test.py
test.py:4:5: error: Expression has type "Any" [no-any-expr]
for a in b:
^
test.py:8:9: error: Expression has type "Any" [no-any-expr]
for a in b:
^
Found 2 errors in 1 file (checked 1 source file)
Actual
> mypy test.py
test.py:4:1: error: Expression has type "Any" [no-any-expr]
for a in b:
^
test.py:8:5: error: Expression has type "Any" [no-any-expr]
for a in b:
^
Found 2 errors in 1 file (checked 1 source file)
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
Riproduci il problema con lo snippet Python e confronta le posizioni del cursore segnalate per i cicli for di primo livello e annidati. Traccia la gestione della posizione diagnostica per il for target, quindi verifica che il cursore punti sotto l’espressione target in entrambi i casi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- compilers
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 48/100