Skip to content

Commit c8ef1cc

Browse files
CTY-gitwhoisarpit
authored andcommitted
make --debug always plain
1 parent b6b17b2 commit c8ef1cc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

patchwork/app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ def cli(
158158
debug: bool,
159159
):
160160
setup_cli()
161-
162-
init_cli_logger(log, plain)
161+
is_plain_console = plain or debug
162+
init_cli_logger(log, is_plain_console)
163163

164164
if "::" in patchflow:
165165
module_path, _, patchflow_name = patchflow.partition("::")
@@ -169,7 +169,7 @@ def cli(
169169

170170
possbile_module_paths = deque((module_path,))
171171

172-
panel = nullcontext() if plain or not debug else logger.panel("Initializing Patchwork CLI")
172+
panel = nullcontext() if is_plain_console else logger.panel("Initializing Patchwork CLI")
173173

174174
with panel:
175175
inputs = {}
@@ -229,7 +229,7 @@ def cli(
229229
# treat --key=value as a key-value pair
230230
inputs[key] = value
231231

232-
patchflow_panel = nullcontext() if plain or not debug else logger.panel(f"Patchflow {patchflow} inputs")
232+
patchflow_panel = nullcontext() if is_plain_console else logger.panel(f"Patchflow {patchflow} inputs")
233233

234234
with patchflow_panel as _:
235235
if debug is True:

0 commit comments

Comments
 (0)