MCPcopy Create free account
hub / github.com/cdgriffith/Box / Settings

Class Settings

test/test_strict_box.py:126–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124
125def test_internal_attributes_and_property_setters():
126 class Settings(StrictBox):
127 _box_internal_attrs = ("_source",)
128
129 @property
130 def doubled(self):
131 return self.value * 2
132
133 @doubled.setter
134 def doubled(self, value):
135 self.value = value // 2
136
137 settings = Settings(value=1)
138 settings._source = "config.json"

Calls

no outgoing calls