From 402da2d430006f8ae42494189ca4191e9fc9d521 Mon Sep 17 00:00:00 2001 From: Christopher Bartz Date: Tue, 10 Sep 2024 12:13:21 +0200 Subject: [PATCH] remove Optional --- src/event_timer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/event_timer.py b/src/event_timer.py index 5cc284fa4..ab94c5736 100644 --- a/src/event_timer.py +++ b/src/event_timer.py @@ -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 @@ -46,7 +46,7 @@ class EventConfig(TypedDict): event: str interval: int random_delay: int - timeout: Optional[int] + timeout: int unit: str @@ -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,