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

Class WithSettablesNoPrefix

tests/test_commandset.py:1048–1064  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1046
1047 # Declare a CommandSet with an empty settable prefix
1048 class WithSettablesNoPrefix(CommandSetBase):
1049 def __init__(self) -> None:
1050 super().__init__()
1051
1052 self._arbitrary = Arbitrary()
1053 self._settable_prefix = ""
1054 self.my_int = 11
1055
1056 self.add_settable(
1057 Settable(
1058 "another_value",
1059 float,
1060 "Some settable value",
1061 settable_object=self._arbitrary,
1062 settable_attrib_name="some_value",
1063 )
1064 )
1065
1066 # Declare a commandset with duplicate settable name
1067 class WithSettablesB(CommandSetBase):

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…