MCPcopy Index your code
hub / github.com/python/cpython / get_colors

Function get_colors

Misc/mypy/_colorize.py:431–437  ·  view source on GitHub ↗
(
    colorize: bool = False, *, file: IO[str] | IO[bytes] | None = None
)

Source from the content-addressed store, hash-verified

429
430
431def get_colors(
432 colorize: bool = False, *, file: IO[str] | IO[bytes] | None = None
433) -> ANSIColors:
434 if colorize or can_colorize(file=file):
435 return ANSIColors()
436 else:
437 return NoColors
438
439
440def decolor(text: str) -> str:

Callers

nothing calls this directly

Calls 2

can_colorizeFunction · 0.70
ANSIColorsClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…