build: set the type of build_artifacts

Currently, build_artifacts are of type set[str] | list, which prevents
us from performing set operations on it. In a future patch, we will
want to take a set difference and set intersections with it, so we
initialize the type of build_artifacts to a set in all cases.
This commit is contained in:
Wojciech Mitros
2023-03-16 18:08:33 +01:00
parent 0a34a54c73
commit c53d68ee3e

View File

@@ -1507,10 +1507,10 @@ default_modes = args.selected_modes or [mode for mode, mode_cfg in modes.items()
build_modes = {m: modes[m] for m in selected_modes}
if args.artifacts:
build_artifacts = []
build_artifacts = set()
for artifact in args.artifacts:
if artifact in all_artifacts:
build_artifacts.append(artifact)
build_artifacts.add(artifact)
else:
print("Ignoring unknown build artifact: {}".format(artifact))
if not build_artifacts: