python / python/mypy

dmypy does not detect the --no-color option

Open
#12,289 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug topic-configuration topic-daemon
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing dmypy on a Windows console with the --no-color option, then trace the daemon's command-line handling and output display path. Done means dmypy honors --no-color and its output is readable without malformed color sequences; the issue also mentions that correctly rendering colors could be an alternative.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.