1.7.32 ba_data update

This commit is contained in:
Ayush Saini 2023-12-21 15:55:50 +05:30
parent bf2f252ee5
commit 15393d5461
144 changed files with 4296 additions and 2411 deletions

View file

@ -71,12 +71,19 @@ def _default_color_enabled() -> bool:
"""Return whether we enable ANSI color codes by default."""
import platform
# If we're not attached to a terminal, go with no-color.
# If our stdout is not attached to a terminal, go with no-color.
if not sys.__stdout__.isatty():
return False
# Another common way to say the terminal can't do fancy stuff like color:
if os.environ.get('TERM') == 'dumb':
termenv = os.environ.get('TERM')
# If TERM is unset, don't attempt color (this is currently the case
# in xcode).
if termenv is None:
return False
# A common way to say the terminal can't do fancy stuff like color.
if termenv == 'dumb':
return False
# On windows, try to enable ANSI color mode.