This has several advantages:
- Will help a lot with readability as parsing the error lines is easier if color highlights the error ranges.
- In the future we can optionally (via config) drop the ranges and only use color, recovering back the extra lines that the carets are taking.
- All the cool kids are doing it: This feature has already been successfully implemented in various tools. It has proven to be an effective aid for developers in quickly identifying the source and location of errors.
Control features:
- The feature will use 16 ANSI color scapes so the actual color is configured via the terminal emulator.
- Users can set the following env vars to control it (in the following order):
Linked PRs
This has several advantages:
Control features:
PY_COLORS=1activates the feature (used by pytest: https://github.com/pytest-dev/pytest/blob/022f1b4de546c8b3529e071965555888ecf01cb4/src/_pytest/_io/terminalwriter.py#L28)PY_COLORS=0deactivates the featureNO_COLOR=1deactivates the featureFORCE_COLOR=1activates the featureTERMis set todumb.Linked PRs