Compare to `None` using identity `is` operator
This is a trivial change that replaces `==` operator with `is` operator, following PEP 8 guideline:
> Comparisons to singletons like None should always be done with is or is not, never the equality operators.
https://legacy.python.org/dev/peps/pep-0008/#programming-recommendations
diff --git a/scripts/vk_validation_stats.py b/scripts/vk_validation_stats.py
index f368824..217ddf3 100755
--- a/scripts/vk_validation_stats.py
+++ b/scripts/vk_validation_stats.py
@@ -265,7 +265,7 @@
if True in [line.strip().startswith(comment) for comment in ['//', '/*']]:
continue
# Find vuid strings
- if prepend != None:
+ if prepend is not None:
line = prepend[:-2] + line.lstrip().lstrip('"') # join lines skipping CR, whitespace and trailing/leading quote char
prepend = None
if any(prefix in line for prefix in vuid_prefixes):
@@ -333,7 +333,7 @@
continue
# if line ends in a broken VUID string, fix that before proceeding
- if prepend != None:
+ if prepend is not None:
line = prepend[:-2] + line.lstrip().lstrip('"') # join lines skipping CR, whitespace and trailing/leading quote char
prepend = None
if any(prefix in line for prefix in vuid_prefixes):