From f9f3daffa7775be23a01840be171b923da972497 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 17 Aug 2022 14:48:16 +0530 Subject: [PATCH] UT: Add missing type hint to event_queue_subscriber fixture --- .../common/event_queue/test_pypubsub_event_queue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/tests/unit_tests/common/event_queue/test_pypubsub_event_queue.py b/monkey/tests/unit_tests/common/event_queue/test_pypubsub_event_queue.py index d48d5fc00..006a27916 100644 --- a/monkey/tests/unit_tests/common/event_queue/test_pypubsub_event_queue.py +++ b/monkey/tests/unit_tests/common/event_queue/test_pypubsub_event_queue.py @@ -1,6 +1,6 @@ from dataclasses import dataclass from ipaddress import IPv4Address -from typing import FrozenSet, Union +from typing import Callable, FrozenSet, Union from uuid import UUID import pytest @@ -37,7 +37,7 @@ def event_queue() -> IEventQueue: @pytest.fixture -def event_queue_subscriber(): +def event_queue_subscriber() -> Callable[[AbstractEvent], None]: def fn(event: AbstractEvent): fn.call_count += 1 fn.call_types.add(event.__class__)