MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / configure_output

Function configure_output

unity_cli/cli/output.py:106–116  ·  view source on GitHub ↗

Reconfigure module-level consoles based on output mode.

(mode: OutputMode)

Source from the content-addressed store, hash-verified

104
105
106def configure_output(mode: OutputMode) -> None:
107 """Reconfigure module-level consoles based on output mode."""
108 global console, err_console, _current_mode
109 _current_mode = mode
110
111 if mode is OutputMode.PLAIN or mode is OutputMode.JSON:
112 console = Console(highlight=False, no_color=True, soft_wrap=True)
113 err_console = Console(stderr=True, highlight=False, no_color=True, soft_wrap=True)
114 else:
115 console = Console()
116 err_console = Console(stderr=True)
117
118
119def get_output_mode() -> OutputMode:

Callers 11

setup_methodMethod · 0.90
teardown_methodMethod · 0.90
setup_methodMethod · 0.90
teardown_methodMethod · 0.90
setup_methodMethod · 0.90
setup_methodMethod · 0.90
teardown_methodMethod · 0.90
_plain_modeFunction · 0.90
_pretty_modeFunction · 0.90
_should_jsonFunction · 0.90
mainFunction · 0.90

Calls 1

ConsoleClass · 0.85

Tested by 9

setup_methodMethod · 0.72
teardown_methodMethod · 0.72
setup_methodMethod · 0.72
teardown_methodMethod · 0.72
setup_methodMethod · 0.72
setup_methodMethod · 0.72
teardown_methodMethod · 0.72
_plain_modeFunction · 0.72
_pretty_modeFunction · 0.72