diff options
author | mathieui <mathieui@mathieui.net> | 2018-07-23 20:58:30 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2018-07-23 21:23:48 +0200 |
commit | ec0595442035148486b0fd307f2592923a865425 (patch) | |
tree | 85b1028971cd315cdfef6bb67d2230f337aedc29 /poezio/timed_events.py | |
parent | 38f0cd1c32a24a2d680e60608563f52e6a24dbd3 (diff) | |
download | poezio-ec0595442035148486b0fd307f2592923a865425.tar.gz poezio-ec0595442035148486b0fd307f2592923a865425.tar.bz2 poezio-ec0595442035148486b0fd307f2592923a865425.tar.xz poezio-ec0595442035148486b0fd307f2592923a865425.zip |
Light refactoring + typing
Diffstat (limited to 'poezio/timed_events.py')
-rw-r--r-- | poezio/timed_events.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/poezio/timed_events.py b/poezio/timed_events.py index 3eeca2b3..3610a1ed 100644 --- a/poezio/timed_events.py +++ b/poezio/timed_events.py @@ -13,7 +13,7 @@ Once created, they must be added to the list of checked events with """ from datetime import datetime -from typing import Callable +from typing import Callable, Union class DelayedEvent: @@ -22,7 +22,8 @@ class DelayedEvent: Use it if you want an event to happen in, e.g. 6 seconds. """ - def __init__(self, delay: int, callback: Callable, *args) -> None: + def __init__(self, delay: Union[int, float], callback: Callable, + *args) -> None: """ Create a new DelayedEvent. |