diff --git a/sizebot/lib/diff.py b/sizebot/lib/diff.py index a2c53b6f..3e5083ed 100644 --- a/sizebot/lib/diff.py +++ b/sizebot/lib/diff.py @@ -173,15 +173,15 @@ def __init__(self, diff: Diff, time: TV): self.time = time @property - def addPerSec(self) -> SV | None: + def addPerSec(self) -> SV: if self.diff.changetype != "add": - return None + return 0 return SV(self.diff.amount / self.time) @property - def mulPerSec(self) -> Decimal | None: + def mulPerSec(self) -> Decimal: if self.diff.changetype != "mul": - return None + return 1 return Decimal(self.diff.amount ** (1 / self.time)) @property @@ -260,11 +260,11 @@ def __init__(self, rate: Rate, stop: SV | TV): self.stop = stop @property - def addPerSec(self) -> SV | None: + def addPerSec(self) -> SV: return self.rate.addPerSec @property - def mulPerSec(self) -> Decimal | None: + def mulPerSec(self) -> Decimal: return self.rate.mulPerSec @property