Skip to content

Commit 31e4771

Browse files
authored
fix: correctly check the arg count in precompiler.py (bazel-contrib#2165)
This is supposed to check that all argument counts are equal, but due to an incorrect inversion of the conditional, it was checking that *any* pair of argument counts is equal
1 parent 4761c25 commit 31e4771

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/precompiler/precompiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def _compile(options: "argparse.Namespace") -> None:
4848
f"Unknown PycInvalidationMode: {options.invalidation_mode}"
4949
) from e
5050

51-
if len(options.srcs) != len(options.src_names) != len(options.pycs):
51+
if not (len(options.srcs) == len(options.src_names) == len(options.pycs)):
5252
raise AssertionError(
5353
"Mismatched number of --src, --src_name, and/or --pyc args"
5454
)

0 commit comments

Comments
 (0)