From 98e42adeb8ff349c9c15145a0a0e85876c6012b2 Mon Sep 17 00:00:00 2001 From: Falko Schindler Date: Thu, 12 Dec 2024 09:19:59 +0100 Subject: [PATCH] mypy --- nicegui/timer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nicegui/timer.py b/nicegui/timer.py index c6d39a166..b71701bec 100644 --- a/nicegui/timer.py +++ b/nicegui/timer.py @@ -1,7 +1,7 @@ import asyncio import time from contextlib import nullcontext -from typing import Any, Awaitable, Callable, ContextManager +from typing import Any, Awaitable, Callable, ContextManager, Optional from . import background_tasks, core from .awaitable_response import AwaitableResponse @@ -33,7 +33,7 @@ def __init__(self, """ super().__init__() self.interval = interval - self.callback = callback + self.callback: Optional[Callable[..., Any]] = callback self.active = active self._is_canceled = False self._immediate = immediate