Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit faded1e

Browse files
JohnVillalovosgrgustaf
authored andcommitted
[build] Remove use of var=[] in function argument
Previously the function was using 'force=[]' in the function definition. This can cause problems if the function is called more than one time. Change it to use the idiomatic way of 'force=None' and checking for None. Signed-off-by: John L. Villalovos <[email protected]>
1 parent 7ff00a6 commit faded1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/analyze

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def parse_json_tree_helper(js, dep, dlist, zlist, zjslist, jrslist, srclist,
288288

289289

290290
def parse_json_tree(file, dlist, zlist, zjslist, jrslist, srclist, tree,
291-
force=[]):
291+
force=None):
292292
"""Using a JS file as input, gather dependencies and generate separate lists
293293
for each aspect of the build (zephyr options, zjs options, jrs options, src)
294294
@@ -304,7 +304,7 @@ def parse_json_tree(file, dlist, zlist, zjslist, jrslist, srclist, tree,
304304
with open(file) as js:
305305
text = js.read()
306306

307-
if force != []:
307+
if force is not None:
308308
for f in force:
309309
with open(args['JSON_DIR'] + f) as file:
310310
data = json.load(file)

0 commit comments

Comments
 (0)