diff options
author | Eisuke Kawashima <e.kawaschima+github@gmail.com> | 2024-06-04 02:06:48 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-03 12:06:48 -0500 |
commit | f873dd2c8d539378a5118da595ea3fba17ee2e73 (patch) | |
tree | bb6b6ee0de2e168a233119cf820ab9c92f2800a4 | |
parent | ffec63b6a54f719976443cc17b6226030be17c52 (diff) | |
download | llvm-f873dd2c8d539378a5118da595ea3fba17ee2e73.zip llvm-f873dd2c8d539378a5118da595ea3fba17ee2e73.tar.gz llvm-f873dd2c8d539378a5118da595ea3fba17ee2e73.tar.bz2 |
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 <e-kwsm@users.noreply.github.com>
-rw-r--r-- | utils/bazel/configure.bzl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/bazel/configure.bzl b/utils/bazel/configure.bzl index 717b86d..9c3bb32 100644 --- a/utils/bazel/configure.bzl +++ b/utils/bazel/configure.bzl @@ -110,7 +110,7 @@ def _extract_cmake_settings(repository_ctx, llvm_cmake): # Skip if `CMAKE_CXX_STANDARD` is set with # `LLVM_REQUIRED_CXX_STANDARD`. # Then `v` will not be desired form, like "${...} CACHE" - if c[k] != None: + if c[k] is not None: continue # Pick up 1st word as the value. @@ -160,7 +160,7 @@ def _llvm_configure_impl(repository_ctx): repository_ctx, "cmake/Modules/LLVMVersion.cmake", ) - version = {k: v for k, v in version.items() if v != None} + version = {k: v for k, v in version.items() if v is not None} vars.update(version) _write_dict_to_file( |