From 837fbba9982e7eb0a9daa88cb640306754b2b993 Mon Sep 17 00:00:00 2001 From: IIITM-Jay Date: Sun, 27 Oct 2024 20:31:45 +0530 Subject: [PATCH] optimized the for loop for extensions and targets usage --- parse.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/parse.py b/parse.py index 2571c986..29f6062e 100755 --- a/parse.py +++ b/parse.py @@ -25,7 +25,8 @@ print(f"Running with args : {sys.argv}") extensions = sys.argv[1:] - for i in [ + + targets = { "-c", "-chisel", "-go", @@ -34,9 +35,9 @@ "-rust", "-spinalhdl", "-sverilog", - ]: - if i in extensions: - extensions.remove(i) + } + + extensions = [ext for ext in extensions if ext not in targets] print(f"Extensions selected : {extensions}") include_pseudo = False