From f873dd2c8d539378a5118da595ea3fba17ee2e73 Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Tue, 4 Jun 2024 02:06:48 +0900 Subject: 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 --- utils/bazel/configure.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils') 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( -- cgit v1.1