Dmypy only respects the `follow_imports=skip` override on the first run
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
Dmypy ignores follow_imports=skip override on the second run.
To Reproduce
import IPython.terminal.prompts
reveal_type(IPython)
reveal_type(IPython.terminal.prompts)
pyproject.toml:
[tool.mypy]
python_version = "3.10"
follow_imports = "normal"
[[tool.mypy.overrides]]
module = [
"IPython.terminal.prompts",
]
follow_imports = "skip"
Expected Behavior
All runs of dmypy run bar.py will show the same output:
bar.py:4: note: Revealed type is "types.ModuleType"
bar.py:5: note: Revealed type is "Any"
Actual Behavior
The first run of dmypy run bar.py shows:
bar.py:4: note: Revealed type is "types.ModuleType"
bar.py:5: note: Revealed type is "Any"
The second run of dmypy run bar.py shows:
bar.py:4: note: Revealed type is "types.ModuleType"
bar.py:5: note: Revealed type is "types.ModuleType"
Running mypy bar.py works correctly every time.
Your Environment
- Mypy version used: mypy 1.4.0
- Mypy command-line flags:
- Mypy configuration options from
mypy.ini(and other config files): - Python version used: Python 3.10.12
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 riproducendo il problema due volte con dmypy run bar.py usando il pyproject.toml mostrato e il contenuto mostrato di bar.py, quindi confronta l'output del daemon con esecuzioni ripetute di mypy bar.py. Il lavoro è completato quando ogni esecuzione di dmypy rispetta l'override follow_imports = "skip" e riporta i tipi rivelati attesi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- cli, devtools
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 48/100