MCPcopy
hub / github.com/MinishLab/semble / _use_color

Function _use_color

src/semble/stats.py:24–26  ·  view source on GitHub ↗

Return whether ANSI colors should be emitted.

()

Source from the content-addressed store, hash-verified

22
23
24def _use_color() -> bool:
25 """Return whether ANSI colors should be emitted."""
26 return "NO_COLOR" not in os.environ and os.environ.get("TERM") != "dumb" and sys.stdout.isatty()
27
28
29def _color(code: str, text: str, enabled: bool) -> str:

Callers 2

format_savings_reportFunction · 0.85

Calls 1

getMethod · 0.80

Tested by 1