python / python/mypy

dmypy does not detect the --no-color option

Offen
#12,289 3 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug topic-configuration topic-daemon
Vorherrschende Sprache
Python
Sterne
20.6k
Forks
3.3k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

Bug Report

The mypy daemon does not parse the --no-color correctly on windows. The output of dmypy is not properly displayed in a windows console.

(there are two issues here: dmypy ignoring --no-color and the problems in displaying colors)

To Reproduce

  1. Run dmypy from a windows termimal

Expected Behavior

The output of dmypy should render colors correctly. Not having any colored output at all is also acceptable.
The mypy daemon does not parse color output correctly on windows. This could be resolved by using the --no-color option, but this is not used by dmpypy.

Actual Behavior

See the screenshot below: the invocations of mypy work fine, but the output for dmpypy hs hard to interpret.

image

Related: #8164

Your Environment

  • Mypy version used: 0.931
  • Mypy command-line flags:
  • Mypy configuration options from mypy.ini (and other config files): None
  • Python version used: 3.9
  • Operating system and version: Windows 10

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 damit, dmypy auf einer Windows-Konsole mit der Option --no-color zu reproduzieren, und verfolge dann die Befehlszeilenverarbeitung des Daemons und den Pfad zur Anzeige der Ausgabe. Erledigt ist die Aufgabe, wenn dmypy --no-color berücksichtigt und seine Ausgabe ohne fehlerhafte Farbsequenzen lesbar ist; im Issue wird außerdem erwähnt, dass die korrekte Darstellung von Farben eine Alternative sein könnte.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
cli, operating-systems
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

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