Skip to content

Commit dcbd5db

Browse files
committed
Colorize ruff output when run through tox
In most other situations it is typically already colorized. This also includes comments about how to override this to suppress color.
1 parent 4c034db commit dcbd5db

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: tox.ini

+4
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@ commands = pytest --color=yes {posargs}
1313
description = Lint with Ruff
1414
base_python = py{39,310,311,312,38,37}
1515
deps = ruff
16+
set_env =
17+
CLICOLOR_FORCE = 1 # Set NO_COLOR to override this.
1618
commands = ruff check .
1719

1820
[testenv:format]
1921
description = Check formatting with Ruff
2022
base_python = py{39,310,311,312,38,37}
2123
deps = ruff
24+
set_env =
25+
CLICOLOR_FORCE = 1 # Set NO_COLOR to override this.
2226
commands = ruff format --check .
2327

2428
[testenv:mypy]

0 commit comments

Comments
 (0)