summaryrefslogtreecommitdiff
path: root/poezio/timed_events.py
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2020-12-12 18:44:37 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2020-12-12 19:36:18 +0100
commit65b8046fe08a19df937068e5fe5ad15f9b0a785a (patch)
tree827e17a99d39c5db453d0fc0e9b46249292aa4e3 /poezio/timed_events.py
parent34ec9e3ee1384506b2e803bdfe94201a7b7ff4c3 (diff)
downloadpoezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.tar.gz
poezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.tar.bz2
poezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.tar.xz
poezio-65b8046fe08a19df937068e5fe5ad15f9b0a785a.zip
from __future__ import annotations
Now that our baseline is Python 3.7, we can rely on type annotations to be lazily evaluated.
Diffstat (limited to 'poezio/timed_events.py')
-rw-r--r--poezio/timed_events.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/poezio/timed_events.py b/poezio/timed_events.py
index cd7659e2..3354443a 100644
--- a/poezio/timed_events.py
+++ b/poezio/timed_events.py
@@ -32,11 +32,11 @@ class DelayedEvent:
:param function callback: The handler that will be executed.
:param args: Optional arguments passed to the handler.
"""
- self.callback = callback # type: Callable
- self.args = args # type: Tuple[Any, ...]
- self.delay = delay # type: Union[int, float]
+ self.callback: Callable = callback
+ self.args: Tuple[Any, ...] = args
+ self.delay: Union[int, float] = delay
# An asyncio handler, as returned by call_later() or call_at()
- self.handler = None # type: Optional[Handle]
+ self.handler: Optional[Handle] = None
class TimedEvent(DelayedEvent):