python / python/mypy

Reconsider `--extra-checks`

Aperta
#18,070 4 commenti 13 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

meta topic-configuration
Lingua principale
Python
Stelle
20.6k
Fork
3.3k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

--extra-checks was added per this review comment: https://github.com/python/mypy/pull/15425#issuecomment-1604275753

I think a big advantage of mypy relative to other type checkers is that it is relatively configurable. mypy's always had a number of config flags and the error code system that we've been encouraging allows users to enable and disable errors with granularity.

--extra-checks is not self-descriptive, it's not immediately obvious what it turns on or off. If I was a user and ran into a false positive/negative, I would not be able to connect it with the option. It's also part of --strict, so it's not even that extra — most users serious enough about type checking to know what the flag does will already have it on. I vote we keep --strict-concatenate and add --strict-typeddict-update. We can keep both of these as part of --strict and keep --extra-checks for backwards compatibility.

If we want to do more bundling of flags / error codes, I feel we should generalise --strict.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia leggendo il commento di revisione collegato e la gestione attuale di --extra-checks e --strict. Confronta l’organizzazione proposta di --strict-concatenate e --strict-typeddict-update con il requisito di compatibilità all’indietro; il lavoro è completato quando il design dei flag e qualsiasi decisione più ampia sul raggruppamento sono documentati e concordati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
devtools
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.