MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_colors

Function get_colors

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

Source from the content-addressed store, hash-verified

256
257
258def get_colors(
259 colorize: bool = False, *, file: IO[str] | IO[bytes] | None = None
260) -> ANSIColors:
261 if colorize or can_colorize(file=file):
262 return ANSIColors()
263 else:
264 return NoColors
265
266
267def decolor(text: str) -> str:

Callers 9

formatweekMethod · 0.90
get_stateMethod · 0.90
display_resultMethod · 0.90
display_summaryMethod · 0.90
_format_failedMethod · 0.90
__str__Method · 0.90
_runtest_env_changed_excFunction · 0.90
run_single_testFunction · 0.90
rerun_failed_testsMethod · 0.90

Calls 2

can_colorizeFunction · 0.85
ANSIColorsClass · 0.85

Tested by

no test coverage detected