mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-11-14 17:46:03 +00:00
hello API 8 !
This commit is contained in:
parent
3a2b6ade68
commit
0284fee95c
1166 changed files with 26061 additions and 375100 deletions
10
dist/ba_data/python/efro/terminal.py
vendored
10
dist/ba_data/python/efro/terminal.py
vendored
|
|
@ -68,7 +68,7 @@ class TerminalColor(Enum):
|
|||
|
||||
|
||||
def _default_color_enabled() -> bool:
|
||||
"""Return whether we should enable ANSI color codes by default."""
|
||||
"""Return whether we enable ANSI color codes by default."""
|
||||
import platform
|
||||
|
||||
# If we're not attached to a terminal, go with no-color.
|
||||
|
|
@ -307,15 +307,11 @@ class ClrNever(ClrBase):
|
|||
|
||||
|
||||
_envval = os.environ.get('EFRO_TERMCOLORS')
|
||||
_color_enabled: bool = (
|
||||
color_enabled: bool = (
|
||||
True
|
||||
if _envval == '1'
|
||||
else False
|
||||
if _envval == '0'
|
||||
else _default_color_enabled()
|
||||
)
|
||||
Clr: type[ClrBase]
|
||||
if _color_enabled:
|
||||
Clr = ClrAlways
|
||||
else:
|
||||
Clr = ClrNever
|
||||
Clr: type[ClrBase] = ClrAlways if color_enabled else ClrNever
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue