Skip to content

Commit

Permalink
fix DurationEventRule.getSeconds returning float, also fix type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Dec 22, 2024
1 parent b25cea5 commit d141945
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scal3/event_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,8 +1421,8 @@ def __init__(self, parent: RuleContainer) -> None:
self.value = 0
self.unit = 1 # seconds

def getSeconds(self) -> str:
return self.value * self.unit
def getSeconds(self) -> int:
return int(self.value * self.unit)

def setSeconds(self, s: int) -> None:
assert isinstance(s, int)
Expand Down

0 comments on commit d141945

Please sign in to comment.