aboutsummaryrefslogtreecommitdiff
path: root/src/EventManager.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/EventManager.py')
-rw-r--r--src/EventManager.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/EventManager.py b/src/EventManager.py
index 7acd98f9..46ea3ed7 100644
--- a/src/EventManager.py
+++ b/src/EventManager.py
@@ -11,8 +11,6 @@ DEFAULT_PRIORITY = PRIORITY_MEDIUM
DEFAULT_EVENT_DELIMITER = "."
DEFAULT_MULTI_DELIMITER = "|"
-CALLBACK_TYPE = typing.Callable[["Event"], typing.Any]
-
class Event(object):
def __init__(self, name: str, kwargs):
self.name = name
@@ -27,6 +25,8 @@ class Event(object):
def eat(self):
self.eaten = True
+CALLBACK_TYPE = typing.Callable[[Event], typing.Any]
+
class EventHook(object):
def __init__(self, event_name: str, func: CALLBACK_TYPE,
context: typing.Optional[str], priority: int,