HTML docs say --strict "[e]nable[s] all optional error checking flags"; it does not
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 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
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus python/mypy
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
python/mypy#21658 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug topic-configuration topic-error-reporting
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
python/mypy#21376 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug topic-attrs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
python/mypy#20818 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
[Bug] @deck.gl/arcgis dist import resolves to unpublished @deck.gl/core source path (9.3.11, 9.4.0)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
workflow: a tick's dispatch counts as 'only this step', and no review self-grants a round unattendedOffenworkflow
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
kristofdegrave/homeassistant-smart-charging#1505 ·
Maintainer antworten meist innerhalb von 1 Tag
-
metadata submission
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
canonical/content-cache-operator#163 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[submission]Offensubmission
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 65/100
leanprover/lean-eval-submissions#1852 ·
Maintainer antworten meist innerhalb von 1 Tag