You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…not present (#13814)
Fixes#13806
This PR adds support for a FORCE_COLOR environment variable. If both
MYPY_FORCE_COLOR and FORCE_COLOR are present, mypy will continue to use
MYPY_FORCE_COLOR over FORCE_COLOR. However, if only FORCE_COLOR is set,
mypy will use that environment variable in much the same way it
currently uses MYPY_FORCE_COLOR.
MYPY_FORCE_COLOR appears to be undocumented and untested currently, so
this PR doesn't add any tests. However, @hugovk has tested this change
manually and using GitHub Actions, and reports that it appears to work
as expected.
Feature
Force colour when the
FORCE_COLOR
environment variable is set.Pitch
Mypy automatically adds colour to output for TTYs, or if the env var
MYPY_FORCE_COLOR
is set.For example, GitHub Actions is not a tty but it's good to add colour to help read the logs.
FORCE_COLOR
is used by many CLI tools and libraries.It would be good if mypy forced colour output if either
FORCE_COLOR
orMYPY_FORCE_COLOR
is set.This helps avoid adding lots of separate env vars for each tool/CLI, for example:
For reference:
The text was updated successfully, but these errors were encountered: