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

Method no_colors

Misc/mypy/_colorize.py:413–428  ·  view source on GitHub ↗

Return a new Theme where colors in all sections are empty strings. This allows writing user code as if colors are always used. The color fields will be ANSI color code strings when colorization is desired and possible, and empty strings otherwise.

(cls)

Source from the content-addressed store, hash-verified

411
412 @classmethod
413 def no_colors(cls) -> Self:
414 """Return a new Theme where colors in all sections are empty strings.
415
416 This allows writing user code as if colors are always used. The color
417 fields will be ANSI color code strings when colorization is desired
418 and possible, and empty strings otherwise.
419 """
420 return cls(
421 argparse=Argparse.no_colors(),
422 difflib=Difflib.no_colors(),
423 fancycompleter=FancyCompleter.no_colors(),
424 live_profiler=LiveProfiler.no_colors(),
425 syntax=Syntax.no_colors(),
426 traceback=Traceback.no_colors(),
427 unittest=Unittest.no_colors(),
428 )
429
430
431def get_colors(

Callers 1

_colorize.pyFile · 0.45

Calls 1

clsClass · 0.50

Tested by

no test coverage detected