diff --git a/monkey/common/event_queue/pypubsub_event_queue.py b/monkey/common/event_queue/pypubsub_event_queue.py index 5813cec3c..1e3fdd85e 100644 --- a/monkey/common/event_queue/pypubsub_event_queue.py +++ b/monkey/common/event_queue/pypubsub_event_queue.py @@ -1,4 +1,4 @@ -from typing import Callable +from typing import Callable, Type from pubsub.core import Publisher @@ -19,7 +19,7 @@ class PyPubSubEventQueue(IEventQueue): ) def subscribe_type( - self, event_type: AbstractEvent, subscriber: Callable[[AbstractEvent], None] + self, event_type: Type[AbstractEvent], subscriber: Callable[[AbstractEvent], None] ): # pypubsub.pub.subscribe needs a string as the topic/event name self._pypubsub_publisher.subscribe(listener=subscriber, topicName=event_type.__name__)