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

Method no_colors

Lib/_colorize.py:243–255  ·  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

241
242 @classmethod
243 def no_colors(cls) -> Self:
244 """Return a new Theme where colors in all sections are empty strings.
245
246 This allows writing user code as if colors are always used. The color
247 fields will be ANSI color code strings when colorization is desired
248 and possible, and empty strings otherwise.
249 """
250 return cls(
251 argparse=Argparse.no_colors(),
252 syntax=Syntax.no_colors(),
253 traceback=Traceback.no_colors(),
254 unittest=Unittest.no_colors(),
255 )
256
257
258def get_colors(

Callers 3

_colorize.pyFile · 0.45
test_copy_withMethod · 0.45
test_no_colorsMethod · 0.45

Calls 1

clsClass · 0.50

Tested by 2

test_copy_withMethod · 0.36
test_no_colorsMethod · 0.36