Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

HTML docs say --strict "[e]nable[s] all optional error checking flags"; it does not

Chiusa Adatta ai principianti
#22,057 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
90/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
documentation

Direzione di ricerca

Inizia da docs/source/config_file.rst, che sembra generare la documentazione HTML interessata, e leggi la formulazione dell’opzione strict insieme all’output di mypy --help a cui fa riferimento. Aggiorna l’affermazione in modo che descriva accuratamente i flag opzionali selezionati per il controllo degli errori, quindi verifica che la documentazione config_file sottoposta a rendering non dica più che tutti i flag opzionali sono abilitati.

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

Descrizione

bug documentation

Bug Report

The HTML documentation, as of mypy-2.3.1, incorrectly claims that --strict enables all optional error checking flags:

strict
[...]
Enable all optional error checking flags. You can see the list of flags enabled by strict mode in the full mypy --help output.

Note: the exact list of flags enabled by strict may change over time.

The second sentence is correct, the first is not. My suggestion would be to change wording to "Enable selected optional error checking flags."

(It appears that the HTML documentation may be generated from docs/source/config_file.rst. This wording is still present in latest, which is currently mypy 2.4.0+dev.0861bb6450d6d3658e44dbca9cd2ba478faf3c1d.)

To Reproduce

As one example, mypy --strict does not enable --enable-error-code=ignore-without-code, as demonstrated by

$ echo '1 == "str"  # type: ignore' >/tmp/wrong.py
$ mypy --strict /tmp/wrong.py
Success: no issues found in 1 source file
$ mypy --strict --enable-error-code=ignore-without-code /tmp/wrong.py
/tmp/wrong.py:1: error: "type: ignore" comment without error code (consider "type: ignore[comparison-overlap]" instead)  [ignore-without-code]
Found 1 error in 1 file (checked 1 source file)

Your Environment

mypy was run via uv run --isolated --with 'mypy==2.3.1' mypy [...] on Ubuntu 24.04 LTS, with no pyproject.toml in the directory it was run from.

Lingua principale
Python
Stelle
20.6k
Fork
3.3k
Merge medio
1g 3h
PR unite (30g)
73

Preparare l'ambiente

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.

Altre issue di python/mypy

Tutte le issue di python/mypy

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.