MCPcopy Create free account
hub / github.com/ParzivalHack/PySpector / _dbg

Function _dbg

src/pyspector/cli.py:53–65  ·  view source on GitHub ↗

Emit *msg* via click.echo only when --debug is enabled. Used to gate progress/info chatter so the default output stays focused on findings, warnings and errors. Errors and findings should call click.echo directly, not this helper.

(debug: bool, msg: str = "", **style_kwargs)

Source from the content-addressed store, hash-verified

51 pass
52 return random.choice(fallbacks)
53
54def _dbg(debug: bool, msg: str = "", **style_kwargs) -> None:
55 """Emit *msg* via click.echo only when --debug is enabled.
56
57 Used to gate progress/info chatter so the default output stays focused on
58 findings, warnings and errors. Errors and findings should call click.echo
59 directly, not this helper.
60 """
61 if not debug:
62 return
63 if style_kwargs:
64 click.echo(click.style(msg, **style_kwargs))
65 else:
66 click.echo(msg)
67
68

Callers 3

get_python_file_astsFunction · 0.85
run_scan_commandFunction · 0.85
_execute_scanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected