Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit dcbd5db

Browse files
committedMar 13, 2024
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
 

‎tox.ini

Lines changed: 4 additions & 0 deletions
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)
Please sign in to comment.