Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Offen Anfängerfreundlich
#22,057 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
90/100
Issue-Typ
Dokumentation
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
python
Bereich
documentation

Rechercherichtung

Beginne in docs/source/config_file.rst, das offenbar die betroffene HTML-Dokumentation generiert, und lies die Formulierung zur strict-Option zusammen mit der darin referenzierten mypy --help-Ausgabe. Aktualisiere die Aussage so, dass sie ausgewählte optionale Flags zur Fehlerprüfung korrekt beschreibt, und überprüfe anschließend, dass die gerenderte config_file-Dokumentation nicht mehr behauptet, dass alle optionalen Flags aktiviert sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Python
Sterne
20.6k
Forks
3.3k
Ø Merge
1 T. 3 Std.
Gemergte PRs (30 T.)
64

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus python/mypy

Alle Issues in python/mypy

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.