Skip to content

Commit f873dd2

Browse files
authored
fix(utils/**.py): fix comparison to None (#94022)
from PEP8 (https://peps.python.org/pep-0008/#programming-recommendations): > Comparisons to singletons like None should always be done with is or is not, never the equality operators. Co-authored-by: Eisuke Kawashima <[email protected]>
1 parent ffec63b commit f873dd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/bazel/configure.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def _extract_cmake_settings(repository_ctx, llvm_cmake):
110110
# Skip if `CMAKE_CXX_STANDARD` is set with
111111
# `LLVM_REQUIRED_CXX_STANDARD`.
112112
# Then `v` will not be desired form, like "${...} CACHE"
113-
if c[k] != None:
113+
if c[k] is not None:
114114
continue
115115

116116
# Pick up 1st word as the value.
@@ -160,7 +160,7 @@ def _llvm_configure_impl(repository_ctx):
160160
repository_ctx,
161161
"cmake/Modules/LLVMVersion.cmake",
162162
)
163-
version = {k: v for k, v in version.items() if v != None}
163+
version = {k: v for k, v in version.items() if v is not None}
164164
vars.update(version)
165165

166166
_write_dict_to_file(

0 commit comments

Comments
 (0)