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)
| 51 | pass |
| 52 | return random.choice(fallbacks) |
| 53 | |
| 54 | def _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 |
no outgoing calls
no test coverage detected