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)
| 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 | |
| 431 | def get_colors( |