scripts/coverage.py: use is not None

`is not None` is the more idiomatic Python way to check if an
expression evaluates to not None. and it is more readable.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
Kefu Chai
2023-12-13 10:21:15 +08:00
parent 0d15fc57d5
commit 9c112dacc4

View File

@@ -128,7 +128,7 @@ def generate_coverage_report(path="build/coverage/test", name="tests", input_fil
for root, dirs, files in os.walk(path):
for file in files:
match = re.fullmatch(input_file_re, file)
if not match is None:
if match is not None:
profraw_files.append(os.path.join(root, file))
test_executables.append(os.path.join(root, match.group(1)))
maybe_print(f"Found {len(profraw_files)} input files")