Common: Set event to registry only by class

This commit is contained in:
Ilija Lazoroski 2022-08-18 10:33:10 +02:00
parent aeaabbccc4
commit 4b1ad70f84
1 changed files with 1 additions and 3 deletions

View File

@ -12,9 +12,7 @@ class EventSerializerRegistry:
def __init__(self):
self._registry = {}
def __setitem__(
self, event_class: Union[str, Type[AbstractEvent]], event_serializer: IEventSerializer
):
def __setitem__(self, event_class: Type[AbstractEvent], event_serializer: IEventSerializer):
self._registry[event_class] = event_serializer
def __getitem__(self, event_class: Union[str, Type[AbstractEvent]]):