File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ addopts = [
5757 " --cov-report=term" ,
5858 " --cov-report=xml:coverage.xml" ,
5959 " --cov-report=html:htmlcov" ,
60+ " --cov-report=lcov" ,
6061]
6162
6263[tool .ruff ]
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ def thing_setting(func: Callable) -> ThingSetting:
100100 This should be used as a decorator with a getter and a setter
101101 just like a standard python property decorator. If extra functionality
102102 is not required in the decorator, then using the ThingSetting class
103- directly may allow for clearer code
103+ directly may allow for clearer code where the property works like a normal variable.
104104
105105 When creating a Setting using this decorator you must always create a setter
106106 as it is used to load the value from disk.
@@ -112,7 +112,7 @@ def thing_setting(func: Callable) -> ThingSetting:
112112 the dictionary representation of this BaseModel as this is what will be used to
113113 set the Setting when loading from disk on starting the server.
114114
115- Note: If a setting updated, rather than explicitly set this will not trigger saving.
115+ Note: If a setting is mutated rather than set, this will not trigger saving.
116116 For example: if a Thing has a setting called `dictsetting` holding the dictionary
117117 `{"a": 1, "b": 2}` then `self.dictsetting = {"a": 2, "b": 2}` would trigger saving
118118 but `self.dictsetting[a] = 2` would not, as the setter for `dictsetting` is never
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ def getter(self, func: Callable) -> Self:
229229 def setter (self , func : Callable ) -> Self :
230230 """Decorator to set the property's value
231231
232- ThingPropertys are variables - so they will return the value they hold
232+ ``ThingProperty`` descriptors return the value they hold
233233 when they are accessed. However, they can run code when they are set: this
234234 decorator sets a function as that code.
235235 """
@@ -244,7 +244,7 @@ class ThingSetting(ThingProperty):
244244 A ThingSetting is a ThingProperty with extra functionality for triggering
245245 a Thing to save its settings.
246246
247- Note: If a setting updated, rather than explicitly set this will not trigger saving.
247+ Note: If a setting is mutated rather than assigned to, this will not trigger saving.
248248 For example: if a Thing has a setting called `dictsetting` holding the dictionary
249249 `{"a": 1, "b": 2}` then `self.dictsetting = {"a": 2, "b": 2}` would trigger saving
250250 but `self.dictsetting[a] = 2` would not, as the setter for `dictsetting` is never
You can’t perform that action at this time.
0 commit comments