Skip to content

Add --color-output=force that colors output regardless if it is going to a terminal#19703

Closed
studyingegret wants to merge 30 commits intopython:masterfrom
studyingegret:color-output-2
Closed

Add --color-output=force that colors output regardless if it is going to a terminal#19703
studyingegret wants to merge 30 commits intopython:masterfrom
studyingegret:color-output-2

Conversation

@studyingegret
Copy link
Copy Markdown

@studyingegret studyingegret commented Aug 21, 2025

Fixes #18746

Based on feedback of PR #19685, add --color-output=force, leaving behavior of --color-output unchanged.

Also document MYPY_FORCE_COLOR and FORCE_COLOR.

A breaking change is that FORCE_COLOR now takes precedence over --no-color-output, enabling color. Previously, color is disabled when both are present. Let me know what you think about it (should I preserve old behavior?).

studyingegret and others added 30 commits August 18, 2025 22:48
FORCE_COLOR may impact other tools but I'll give it a try anyway ...
Currently the forked repo is messed up, I plan to test in fork repo's GitHub Actions then clean up the changes.
@studyingegret studyingegret deleted the color-output-2 branch August 21, 2025 07:41
@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@drsybren
Copy link
Copy Markdown

This is exactly what I need, is there any reason why this was closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--color-output doesn't work

2 participants