Skip to content

--color-output doesn't work #18746

@bluenote10

Description

@bluenote10

Bug Report

Using mypy --color-output does not seem to have any effect.

To Reproduce

$ mypy --color-output . | cat

Expected Behavior

This should produce a colored output, because --color-output suggests that colors are enforced. It should look like this (if I omit the | cat):

Image

Actual Behavior

Output is not colored.

Image

Your Environment

  • Mypy version used: 1.15.0
  • Mypy command-line flags: --color-output
  • Mypy configuration options from mypy.ini (and other config files): none
  • Python version used: 3.12.3

May have a similar cause as #13817. EDIT: actually, I no longer think so because FORCE_COLOR and MYPY_FORCE_COLOR works under _some_conditions (if the check I've mentioned there passes, which is not the case in e.g. GitHub or Gitlab), but --color-output never seems to have an effect for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions