Skip to content

Commit 87c2dbf

Browse files
IlyesbdlalaJ12934
authored andcommitted
Using python3.8 List classes instead of python3.10 version of lists
The CI runs on python 3.8.10. The list type does not exist on this version This is the cause for the failing zap-advanced unit-tests Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
1 parent e6b714d commit 87c2dbf

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎scanners/zap-advanced/scanner/zapclient/configuration/zap_configuration.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
import glob
1212
import hiyapyco
1313

14+
from typing import List
15+
1416
# set up logging to file - see previous section for more details
1517
logging.basicConfig(
1618
level=logging.INFO,
@@ -88,7 +90,7 @@ def get_global(self) -> collections.OrderedDict:
8890
return result
8991

9092
@property
91-
def get_all_contexts(self) -> list[collections.OrderedDict]:
93+
def get_all_contexts(self) -> List[collections.OrderedDict]:
9294
return self.__config["contexts"] if "contexts" in self.__config else []
9395

9496
def _get_active_config_from(self, configs: collections.OrderedDict, key: str):

‎scanners/zap-advanced/scanner/zapclient/context/zap_context.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import logging
1111

1212
from zapv2 import ZAPv2
13+
from typing import List
1314

1415
from .. import ZapClient
1516
from ..configuration import ZapConfiguration
@@ -308,7 +309,7 @@ def _get_level(self, level: str):
308309
logging.warn("AlertFilter configured with unknown level: '%s'. This rule will be ignored!", level)
309310
return None
310311

311-
def _configure_alert_filters(self, alert_filters: list[collections.OrderedDict], context_id: int):
312+
def _configure_alert_filters(self, alert_filters: List[collections.OrderedDict], context_id: int):
312313
"""Protected method to configure the ZAP 'Context / Alert Filters' Settings based on a given ZAP config.
313314
314315
Parameters

0 commit comments

Comments
 (0)