[Openmp-commits] [openmp] 11a9ab1 - [OpenMP] Fix comparison to True/False in openmp/**.py (#94041)

via Openmp-commits openmp-commits at lists.llvm.org
Tue Jul 16 07:17:45 PDT 2024


Author: Eisuke Kawashima
Date: 2024-07-16T16:17:42+02:00
New Revision: 11a9ab125737e4b43a98073ccf238cef9c8501b9

URL: https://github.com/llvm/llvm-project/commit/11a9ab125737e4b43a98073ccf238cef9c8501b9
DIFF: https://github.com/llvm/llvm-project/commit/11a9ab125737e4b43a98073ccf238cef9c8501b9.diff

LOG: [OpenMP] Fix comparison to True/False in openmp/**.py (#94041)

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 at users.noreply.github.com>

Added: 
    

Modified: 
    openmp/libompd/gdb-plugin/ompd/ompd.py
    openmp/tools/archer/tests/lit.cfg

Removed: 
    


################################################################################
diff  --git a/openmp/libompd/gdb-plugin/ompd/ompd.py b/openmp/libompd/gdb-plugin/ompd/ompd.py
index a404e621e77bb..8355865408a4e 100644
--- a/openmp/libompd/gdb-plugin/ompd/ompd.py
+++ b/openmp/libompd/gdb-plugin/ompd/ompd.py
@@ -50,7 +50,7 @@ def invoke(self, arg, from_tty):
                     "No ompd_dll_locations symbol in execution, make sure to have an OMPD enabled OpenMP runtime"
                 )
 
-            while gdb.parse_and_eval("(char**)ompd_dll_locations") == False:
+            while not gdb.parse_and_eval("(char**)ompd_dll_locations"):
                 gdb.execute("tbreak ompd_dll_locations_valid")
                 gdb.execute("continue")
 

diff  --git a/openmp/tools/archer/tests/lit.cfg b/openmp/tools/archer/tests/lit.cfg
index 692cbfe97cf1e..f8fbcad752a4c 100644
--- a/openmp/tools/archer/tests/lit.cfg
+++ b/openmp/tools/archer/tests/lit.cfg
@@ -83,7 +83,7 @@ if config.operating_system == 'Darwin':
 if 'Linux' in config.operating_system:
     config.available_features.add("linux")
 
-if config.has_tsan == True:
+if config.has_tsan:
     config.available_features.add("tsan")
 
 # to run with icc INTEL_LICENSE_FILE must be set


        


More information about the Openmp-commits mailing list