Dmypy only respects the `follow_imports=skip` override on the first run
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
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.
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
- Lingua principale
- Python
- Stelle
- 20.6k
- Fork
- 3.3k
- Merge medio
- 1g 18h
- PR unite (30g)
- 54
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.
Altre issue di python/mypy
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
bug topic-configuration topic-error-reporting
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Issue simili
-
area/auth bug comp/agent P3 platform/discord type/security
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
NousResearch/hermes-agent#117848 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
bancolombia/sentinel#23 ·
-
test md ApertaCI
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100