Skip to content

Commit b4035db

Browse files
Fix [] used as a default argument value (mutable default values are dodgy)
Signed-off-by: Gilles Peskine <[email protected]>
1 parent 565b4c3 commit b4035db

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/mbedtls_framework/psa_compliance.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import shutil
1616
import subprocess
1717
import sys
18-
from typing import List
18+
from typing import List, Optional
1919
from pathlib import Path
2020

2121
from . import build_tree
@@ -144,7 +144,7 @@ def test_compliance(library_build_dir: str,
144144

145145
def main(psa_arch_tests_ref: str,
146146
patch: str = '',
147-
expected_failures: List[int] = []) -> None:
147+
expected_failures: Optional[List[int]] = None) -> None:
148148
"""Command line entry point.
149149
150150
psa_arch_tests_ref: tag or sha to use for the arch-tests.
@@ -166,6 +166,8 @@ def main(psa_arch_tests_ref: str,
166166
if args.build_dir is not None:
167167
build_dir = args.build_dir[0]
168168

169+
if expected_failures is None:
170+
expected_failures = []
169171
if args.expected_failures is not None:
170172
expected_failures_list = [int(i) for i in args.expected_failures]
171173
else:

0 commit comments

Comments
 (0)