[llvm] a6ab19b - fix(llvm/**.py): fix comparison to True/False (#94040)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 05:38:19 PDT 2024


Author: Eisuke Kawashima
Date: 2024-09-19T14:38:15+02:00
New Revision: a6ab19b1d400707c6e6cb6074ae52e22ac7885dd

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

LOG: fix(llvm/**.py): fix comparison to True/False (#94040)

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: 
    llvm/utils/indirect_calls.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/indirect_calls.py b/llvm/utils/indirect_calls.py
index 34d9e8f9422b0b..c18cffb26e7ae2 100755
--- a/llvm/utils/indirect_calls.py
+++ b/llvm/utils/indirect_calls.py
@@ -31,7 +31,7 @@ def look_for_indirect(file):
 
     function = ""
     for line in stdout.splitlines():
-        if line.startswith(" ") == False:
+        if not line.startswith(" "):
             function = line
         result = re.search("(call|jmp).*\*", line)
         if result is not None:


        


More information about the llvm-commits mailing list