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

Class Value

tests/test_options.py:667–672  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

665
666def test_dynamic_default_help_special_method(runner):
667 class Value:
668 def __call__(self):
669 return 42
670
671 def __str__(self):
672 return "special value"
673
674 opt = click.Option(["-a"], default=Value(), show_default=True)
675 ctx = click.Context(click.Command("cli"))

Calls

no outgoing calls

Tested by 1