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

Method __init__

tests/test_commandset.py:1049–1064  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

nothing calls this directly

Calls 4

SettableClass · 0.90
ArbitraryClass · 0.85
__init__Method · 0.45
add_settableMethod · 0.45

Tested by

no test coverage detected