forked from p15670423/monkey
Agent: Use Iterable instead of List in type hint
This commit is contained in:
parent
33ec4f7ae9
commit
dc9b91d430
|
@ -1,7 +1,7 @@
|
||||||
import logging
|
import logging
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
from typing import Any, Callable, Dict, List, Optional, Tuple
|
from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple
|
||||||
|
|
||||||
from common.configuration import PluginConfiguration
|
from common.configuration import PluginConfiguration
|
||||||
from common.utils import Timer
|
from common.utils import Timer
|
||||||
|
@ -212,7 +212,7 @@ class AutomatedMaster(IMaster):
|
||||||
|
|
||||||
def _run_pbas(
|
def _run_pbas(
|
||||||
self,
|
self,
|
||||||
plugins: List[PluginConfiguration],
|
plugins: Iterable[PluginConfiguration],
|
||||||
callback: Callable[[Any], None],
|
callback: Callable[[Any], None],
|
||||||
custom_pba_options: Dict,
|
custom_pba_options: Dict,
|
||||||
):
|
):
|
||||||
|
@ -226,7 +226,10 @@ class AutomatedMaster(IMaster):
|
||||||
)
|
)
|
||||||
|
|
||||||
def _run_plugins(
|
def _run_plugins(
|
||||||
self, plugins: List[PluginConfiguration], plugin_type: str, callback: Callable[[Any], None]
|
self,
|
||||||
|
plugins: Iterable[PluginConfiguration],
|
||||||
|
plugin_type: str,
|
||||||
|
callback: Callable[[Any], None],
|
||||||
):
|
):
|
||||||
logger.info(f"Running {plugin_type}s")
|
logger.info(f"Running {plugin_type}s")
|
||||||
logger.debug(f"Found {len(plugins)} {plugin_type}(s) to run")
|
logger.debug(f"Found {len(plugins)} {plugin_type}(s) to run")
|
||||||
|
|
Loading…
Reference in New Issue