Skip to content

Commit

Permalink
fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
falkoschindler committed Dec 11, 2024
1 parent ff93d39 commit 5b23b7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nicegui/timer.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import asyncio
import time
from typing import Awaitable, Callable, ClassVar
from typing import Awaitable, Callable, ClassVar, Optional, Set

from . import background_tasks, core, logging
from .awaitable_response import AwaitableResponse


class Timer:
tasks: ClassVar[set[asyncio.Task]] = set()
tasks: ClassVar[Set[asyncio.Task]] = set()

def __init__(self, interval: float, handler: Callable) -> None:
self.handler = handler
self.interval = interval
self._task: asyncio.Task | None = None
self._task: Optional[asyncio.Task] = None

def start(self) -> None:
"""Start the timer."""
Expand Down

0 comments on commit 5b23b7f

Please sign in to comment.