Overrides in pyproject.toml not excluding specified modules
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
When running mypy with a pyproject.toml configuration that uses the [[tool.mypy.overrides]] section to exclude specific modules, the specified modules are still being type-checked, contrary to expectations.
Steps to Reproduce:
Set up a pyproject.toml with mypy configurations using the [[tool.mypy.overrides]] section to exclude a specific module:
[tool.mypy]
python_version = "3.8"
[[tool.mypy.overrides]]
module = ["test_module.sample"]
ignore_errors = true
Have a sample module with evident type errors:
# test_module/sample.py
def faulty_function() -> int:
return "This should be an integer!"
Run mypy with the provided configuration:
mypy test_module/ --config-file pyproject.toml
Expected Behavior:
The module test_module.sample should be excluded from type-checking and no errors should be reported.
Actual Behavior:
mypy reports type errors from the module test_module.sample, indicating that it is not being excluded as specified in the configuration.
Mypy Version: 1.6.1
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 utilizzando la configurazione mostrata di pyproject.toml e test_module/sample.py, quindi traccia il modo in cui mypy elabora la sezione [[tool.mypy.overrides]]. Il lavoro è completato quando test_module.sample non viene segnalato se ignore_errors è true; verifica il comportamento con il comando mypy fornito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 45/100