From 88608c1cf1de5c02b26b28c7c1c3716486ca6a10 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 13 Dec 2021 07:05:10 -0500 Subject: [PATCH] Agent: Fix some type hints in automated master --- monkey/infection_monkey/master/propagator.py | 2 +- monkey/infection_monkey/master/threading_utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/monkey/infection_monkey/master/propagator.py b/monkey/infection_monkey/master/propagator.py index ba0f5dccd..da36ce5b9 100644 --- a/monkey/infection_monkey/master/propagator.py +++ b/monkey/infection_monkey/master/propagator.py @@ -52,7 +52,7 @@ class Propagator: logger.info("Finished network scan") def _process_scan_results( - self, ip: str, ping_scan_data: PingScanData, port_scan_data: PortScanData + self, ip: str, ping_scan_data: PingScanData, port_scan_data: Dict[int, PortScanData] ): victim_host = VictimHost(ip) has_open_port = False diff --git a/monkey/infection_monkey/master/threading_utils.py b/monkey/infection_monkey/master/threading_utils.py index 5c7da9363..56cf4a459 100644 --- a/monkey/infection_monkey/master/threading_utils.py +++ b/monkey/infection_monkey/master/threading_utils.py @@ -1,6 +1,6 @@ from threading import Thread -from typing import Any, Callable, Tuple +from typing import Callable, Tuple -def create_daemon_thread(target: Callable[[Any], None], args: Tuple[Any] = ()): +def create_daemon_thread(target: Callable[..., None], args: Tuple = ()): return Thread(target=target, args=args, daemon=True)