`var-annotated` errors for iteration should point to the line where the variable is defined
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
- #22266 di @freddyuniverse — chiusa senza merge
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
Direzione di ricerca
Start by tracing how mypy reports var-annotated errors for the comprehension example in the issue, comparing native and non-native parser behavior. The payload names no source files or tests, so locate the relevant error reporting and parser tests first. Done means the error points to the line where the iteration variable is defined in both parser modes.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug Report
See title
To Reproduce
from typing import Never
x: Never
sum( # non-native parser errors here
y # native parser errors here
for y in x # expected error here
)
Expected Behavior
Expected an error at # expected error here.
Actual Behavior
Got an error at either # non-native parser errors here or # native parser errors here based on the parser.
Your Environment
Reproduced in mypy-play.
- Mypy version used: 2.4.0
- Mypy command-line flags: N/A
- Mypy configuration options from
mypy.ini(and other config files): N/A - Python version used: 3.12
- Lingua principale
- Python
- Stelle
- 20.7k
- Fork
- 3.3k
- Merge medio
- 1g 18h
- PR unite (30g)
- 124
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi 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.
Altre issue di python/mypy
-
Regression in 2.4.0: empty constraint tuple in PEP 695 type parameter (`class C[T: ()]`) is no longer reportedForse di nuovo libera @CheerathAniketh l’ha presa 16 giorni fa e non c’è nessuna pull request aperta. Apertatopic-parser topic-pep-695
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
python/mypy#22176 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
matches_gitignore: directory-only patterns in nested .gitignore not excluded under --exclude-gitignoreForse di nuovo libera @pavithraramesh5500-ship-cse l’ha presa 8 giorni fa e non c’è nessuna pull request aperta. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
`stubgen --inspect-mode` crashes with `AttributeError on PEP 604 union syntax (X | Y)` *(mypy 2.1.0)*Forse già presa @ayushdoesdev l’ha presa 84 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Inconsistent description of `strict_optional`Forse già presa @Joosboy l’ha presa 100 giorni fa. Apertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
python/mypy#21658 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Cannot set `output` in `mypy.ini`Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug topic-configuration topic-error-reporting
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
python/mypy#21376 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
pydot/pydot#601 · 4 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
letsencrypt/cp-cps#361 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
CI: startup_failure because callers grant fewer permissions than ledger-app-workflows@v1 declaresForse già presa @maykonmichel l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
LedgerHQ/app-boilerplate-rust#227 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
linuxmint/mintupdate#1107 ·