Skip to content

Commit 5d158d8

Browse files
committed
ci_check_duplicate_usb_vid_pid.py: change 'whitelist' terminology to 'ignorelist'
1 parent 023054e commit 5d158d8

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

tools/ci_check_duplicate_usb_vid_pid.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import re
3030
import sys
3131

32-
DEFAULT_WHITELIST = [
32+
DEFAULT_IGNORELIST = [
3333
"circuitplayground_express",
3434
"circuitplayground_express_crickit",
3535
"circuitplayground_express_displayio",
@@ -43,15 +43,15 @@
4343

4444
cli_parser = argparse.ArgumentParser(description="USB VID/PID Duplicate Checker")
4545
cli_parser.add_argument(
46-
"--whitelist",
47-
dest="whitelist",
46+
"--ignorelist",
47+
dest="ignorelist",
4848
nargs="?",
4949
action="store",
50-
default=DEFAULT_WHITELIST,
50+
default=DEFAULT_IGNORELIST,
5151
help=(
5252
"Board names to ignore duplicate VID/PID combinations. Pass an empty "
5353
"string to disable all duplicate ignoring. Defaults are: "
54-
f"{', '.join(DEFAULT_WHITELIST)}"
54+
f"{', '.join(DEFAULT_IGNORELIST)}"
5555
)
5656
)
5757

@@ -69,7 +69,7 @@ def configboard_files():
6969
)
7070
return working_dir.glob("ports/**/boards/**/mpconfigboard.mk")
7171

72-
def check_vid_pid(files, whitelist):
72+
def check_vid_pid(files, ignorelist):
7373
""" Compiles a list of USB VID & PID values for all boards, and checks
7474
for duplicates. Exits with ``sys.exit()`` (non-zero exit code)
7575
if duplicates are found, and lists the duplicates.
@@ -90,10 +90,10 @@ def check_vid_pid(files, whitelist):
9090

9191
board_name = board_config.parts[-2]
9292

93-
board_whitelisted = False
94-
if board_name in whitelist:
95-
board_whitelisted = True
96-
board_name += " (whitelisted)"
93+
board_ignorelisted = False
94+
if board_name in ignorelist:
95+
board_ignorelisted = True
96+
board_name += " (ignorelisted)"
9797

9898
if usb_vid and usb_pid:
9999
id_group = f"{usb_vid.group(1)}:{usb_pid.group(1)}"
@@ -104,7 +104,7 @@ def check_vid_pid(files, whitelist):
104104
}
105105
else:
106106
usb_ids[id_group]['boards'].append(board_name)
107-
if not board_whitelisted:
107+
if not board_ignorelisted:
108108
usb_ids[id_group]['duplicate'] = True
109109
duplicates_found = True
110110

@@ -128,9 +128,9 @@ def check_vid_pid(files, whitelist):
128128

129129
print("Running USB VID/PID Duplicate Checker...")
130130
print(
131-
f"Ignoring the following boards: {', '.join(arguments.whitelist)}",
131+
f"Ignoring the following boards: {', '.join(arguments.ignorelist)}",
132132
end="\n\n"
133133
)
134134

135135
board_files = configboard_files()
136-
check_vid_pid(board_files, arguments.whitelist)
136+
check_vid_pid(board_files, arguments.ignorelist)

0 commit comments

Comments
 (0)