MCPcopy Create free account
hub / github.com/python-cmd2/cmd2 / WithSettablesA

Class WithSettablesA

tests/test_commandset.py:1029–1045  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1027
1028 # Declare a CommandSet with a settable of some arbitrary property
1029 class WithSettablesA(CommandSetBase):
1030 def __init__(self) -> None:
1031 super().__init__()
1032
1033 self._arbitrary = Arbitrary()
1034 self._settable_prefix = "addon"
1035 self.my_int = 11
1036
1037 self.add_settable(
1038 Settable(
1039 "arbitrary_value",
1040 int,
1041 "Some settable value",
1042 settable_object=self._arbitrary,
1043 settable_attrib_name="some_value",
1044 )
1045 )
1046
1047 # Declare a CommandSet with an empty settable prefix
1048 class WithSettablesNoPrefix(CommandSetBase):

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…