forked from p15670423/monkey
Common: Fix type hint for IEventQueue.subscribe_type()
This commit is contained in:
parent
d151ce12fd
commit
83e09ca957
|
@ -1,5 +1,5 @@
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from typing import Callable
|
from typing import Callable, Type
|
||||||
|
|
||||||
from common.events import AbstractEvent
|
from common.events import AbstractEvent
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ class IEventQueue(ABC):
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def subscribe_type(
|
def subscribe_type(
|
||||||
self, event_type: AbstractEvent, subscriber: Callable[[AbstractEvent], None]
|
self, event_type: Type[AbstractEvent], subscriber: Callable[[AbstractEvent], None]
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Subscribes a subscriber to the specifed event type
|
Subscribes a subscriber to the specifed event type
|
||||||
|
|
Loading…
Reference in New Issue