Skip to content

Commit

Permalink
remove Optional
Browse files Browse the repository at this point in the history
  • Loading branch information
cbartz committed Sep 10, 2024
1 parent deaa76d commit 402da2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/event_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import logging
import subprocess # nosec B404
from pathlib import Path
from typing import Optional, TypedDict
from typing import TypedDict

import jinja2

Expand Down Expand Up @@ -46,7 +46,7 @@ class EventConfig(TypedDict):
event: str
interval: int
random_delay: int
timeout: Optional[int]
timeout: int
unit: str


Expand Down Expand Up @@ -123,7 +123,7 @@ def ensure_event_timer(self, event_name: str, interval: int, timeout: int) -> No
Raises:
TimerEnableError: Timer cannot be started. Events will be not emitted.
"""
timeout_in_secs = timeout * 60 if timeout is not None else None
timeout_in_secs = timeout * 60

context: EventConfig = {
"event": event_name,
Expand Down

0 comments on commit 402da2d

Please sign in to comment.