python / python/mypy

--strict flags

Offen
#21,396 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Python
Sterne
20.6k
Forks
3.3k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

TL;DR restore the meaning of --static

elaborating the parenthesis in my pull request (#20982) ...

i was not serious when i suggested adding an --all flag. i prefer having --strict enable more flags, and the documentation supports this change (#3c9ee34). more precisely, i think --strict should enable two more flags:

  • --warn-unreachable is not a type checking feature, but i think the bugs it finds should be fixed. they are easy to fix, and enabling this flag would be consistent with the documentation: "This subset primarily includes checks for inadvertent type unsoundness." [emphasis added]

  • many people will expect --strict to enable --strict-equality-for-none. the bugs found by the new check are easy to fix, and they are also in my should-fix category. (trailing whitespace might be the best example of a should-fix bug.)

further simplification is possible. having --strict-equality-for-none imply --strict-equality would reduce command line length when the new check is desired. when i enabled this check, it found no errors in my code. so i think removing the flag and extending --strict-equality deserves consideration.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit docs/source/command_line.rst und der Diskussion in Pull Request #20982. Überprüfe, wie die genannten strict-bezogenen Flags derzeit definiert sind, und entscheide, welche aktiviert oder impliziert werden sollten; abgeschlossen ist die Aufgabe, wenn eine abgestimmte Flag-Richtlinie konsistent in Implementierung und Dokumentation umgesetzt ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
cli, compilers
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

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