Skip to content

Honor CLICOLOR=0 in Ruff and ty diagnostics - #29910

Merged
AlexWaygood merged 1 commit into
mainfrom
alex/clicolor-zero
Nov 3, 2026
Merged

AlexWaygood merged 1 commit into
mainfrom
alex/clicolor-zero

Conversation

@AlexWaygood

Copy link
Copy Markdown
Member

Summary

CLICOLOR=0 ruff check and CLICOLOR=0 ty check currently print colored diagnostics on a terminal because both commands treat 0 like any other non-empty CLICOLOR value. This change makes CLICOLOR=0 disable color, as Micha requested on #29898.

A non-empty FORCE_COLOR or CLICOLOR_FORCE still takes precedence over CLICOLOR. For example, CLICOLOR=0 FORCE_COLOR=0 ty check still forces color, even in a pipe.

@AlexWaygood AlexWaygood added cli Related to the command-line interface of Ruff or ty ty The ty type checker labels Nov 2, 2026
@AlexWaygood
AlexWaygood requested review from a team as code owners November 2, 2026 15:38
@AlexWaygood
AlexWaygood requested review from MichaReiser and removed request for carljm November 2, 2026 15:38
@AlexWaygood AlexWaygood removed the ty The ty type checker label Nov 2, 2026
@AlexWaygood AlexWaygood changed the title [ty] Honor CLICOLOR=0 in Ruff and ty diagnostics Honor CLICOLOR=0 in Ruff and ty diagnostics Nov 2, 2026
@astral-automations-bot

Copy link
Copy Markdown
Contributor

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 98.60%. The percentage of expected errors that received a diagnostic held steady at 98.86%. The number of fully passing files held steady at 137/146.

Results for 598bfc4 · Workflow run

@astral-automations-bot

Copy link
Copy Markdown
Contributor

Memory usage report

Memory usage unchanged ✅


Results for 598bfc4 · Workflow run

@astral-automations-bot

Copy link
Copy Markdown
Contributor

ecosystem-analyzer results

No diagnostic changes detected ✅

Flaky changes detected. This PR summary excludes flaky changes; see the HTML report for details.

Full report with detailed diff · Timing results


Results for 598bfc4 · Workflow run

@astral-automations-bot

Copy link
Copy Markdown
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Linter (stable) · Linter (preview)


Results for 598bfc4 · Workflow run

@AlexWaygood
AlexWaygood merged commit 91375d8 into main Nov 3, 2026
81 checks passed
@AlexWaygood
AlexWaygood deleted the alex/clicolor-zero branch November 3, 2026 16:12

This branch was previously deployed

1 inactive deployment
automations — 598bfc48 Deployed Nov 2, 2026 by AlexWaygood via security-review / security review #96580
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Related to the command-line interface of Ruff or ty

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant