depends.py: improve expected argument type
Requested config option can be either boolean or a string.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
diff --git a/tests/scripts/depends.py b/tests/scripts/depends.py
index 1ab6d70..9c3c49a 100755
--- a/tests/scripts/depends.py
+++ b/tests/scripts/depends.py
@@ -59,6 +59,8 @@
import subprocess
import sys
import traceback
+from typing import Union
+
# Add the Mbed TLS Python library directory to the module search path
import scripts_path # pylint: disable=unused-import
import config
@@ -128,8 +130,10 @@
return False
return True
-def set_config_option_value(conf, option, colors, value):
- """Set/unset a configuration option, optionally specifying a value"""
+def set_config_option_value(conf, option, colors, value: Union[bool, str]):
+ """Set/unset a configuration option, optionally specifying a value.
+value can be either True/False (set/unset config option), or a string,
+which will make a symbol defined with a certain value."""
if not option_exists(conf, option):
log_line('Symbol {} was not found in {}'.format(option, conf.filename), color=colors.red)
return False