--strict does not include all mypy checks
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 configuring mypy, I mistakenly assumed that --strict included all possible mypy checks (thus being as strict as possible). However, there are a lot of other checks that are not included in --strict, such as --warn-unreachable or disallow_any_unimported = True or even enable_error_code = ignore-without-code.
Can we add a section to --strict's documentation and --help page explaining all of mypy's stricter checks that are not included in --strict? As far as I can tell, these are the missing ones:
[mypy]
strict = True
# Missing:
warn_unreachable = True
disallow_any_expr = True
disallow_any_decorated = True
disallow_any_explicit = True
disallow_any_unimported = True
# Not strictness checks per se, but enforces uniformity for type: ignores.
show_error_codes = True
enable_error_code = ignore-without-code
Additionally, it might be useful to add a --strictest flag that always opts into all of mypy's checks.
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 dalla documentazione e dai punti di ingresso di --help per --strict, quindi confronta la relativa descrizione con i controlli elencati che non sono abilitati. Documenta i controlli omessi e la distinzione relativa all’ignorare i codici di errore; considera separatamente il flag --strictest proposto. Il lavoro è completato quando entrambi i riferimenti a --strict spiegano chiaramente le opzioni più rigorose rimanenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100