MCPcopy
hub / github.com/pallets/click / print_and_exit

Function print_and_exit

tests/test_commands.py:429–432  ·  view source on GitHub ↗
(ctx, param, value)

Source from the content-addressed store, hash-verified

427 """
428
429 def print_and_exit(ctx, param, value):
430 if value:
431 click.echo(f"Value of {param.name} is: {value}")
432 ctx.exit()
433
434 @click.command(context_settings={"help_option_names": ("--my-help",)})
435 @click.option("-a", is_flag=True, expose_value=False, callback=print_and_exit)

Callers

nothing calls this directly

Calls 1

exitMethod · 0.80

Tested by

no test coverage detected