We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa6099d commit ae383deCopy full SHA for ae383de
src/frequenz/sdk/timeseries/_resampling/_wall_clock_timer.py
@@ -248,6 +248,9 @@ def __post_init__(self) -> None:
248
wall_clock_elapsed,
249
)
250
wall_clock_elapsed = self.monotonic_elapsed * 0.1
251
+ # We need to use __setattr__ here to bypass the frozen nature of the
252
+ # dataclass. Since we are constructing the class, this is fine and the only
253
+ # way to set calculated defaults in frozen dataclasses at the moment.
254
super().__setattr__(
255
"wall_clock_factor", self.monotonic_elapsed / wall_clock_elapsed
256
0 commit comments