From 5a34be0b9d6272c4f6d891971c7f3561aa1e69ea Mon Sep 17 00:00:00 2001 From: Alexander Druz Date: Wed, 7 Feb 2024 11:17:18 +0100 Subject: [PATCH] Debug parsing --- main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 674fed7..19bb940 100755 --- a/main.py +++ b/main.py @@ -72,7 +72,12 @@ def parse_include_exclude(input_include_exclude: str) -> list: return include_exclude -def assert_valid_extra(extra: Any) -> None: ... +def assert_valid_extra(extra: Any) -> None: + if not isinstance(extra, list): + raise TypeError( + f"Include/exclude must be an array (Python list), but Python " + f"{type(extra)} received." + ) def assert_valid_matrix(matrix: Any) -> None: @@ -106,7 +111,7 @@ def parse_matrix(input_matrix: str) -> dict: print(yaml.dump({"matrix": matrix})) # output_matrix = json.dumps(matrix) - output_matrix = "{'include':[]}" + output_matrix = "{'os': ['ubuntu-latest', 'macos-latest'], 'include':[]}" output("matrix", output_matrix) setenv("MATRIX", output_matrix)