Skip to content

Commit 89e519e

Browse files
committed
Colorize mypy output when run through tox
On Unix-like systems, this approach is currently only sufficient if the TERM environment variable is set. In practice this means that if tox is run on CI, color will not be shown. Because GitPython does not itself use tox on CI, and other (e.g. downstream) projects may not want color on CI or in other situations where this would be insufficient, the further step of defining TERM as a workaround is deliberately omitted. See aeacb0 in #1859 for what adding TERM would look like. This does not make any changes to how mypy runs on CI because that change is already included there.
1 parent dcbd5db commit 89e519e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: tox.ini

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ commands = ruff format --check .
2828
[testenv:mypy]
2929
description = Typecheck with mypy
3030
base_python = py{39,310,311,312,38,37}
31+
set_env =
32+
MYPY_FORCE_COLOR = 1
3133
commands = mypy -p git
3234
ignore_outcome = true
3335

0 commit comments

Comments
 (0)