[llvm] fix(llvm/**.py): fix comparison to True/False (PR #94040)
Eisuke Kawashima via llvm-commits
llvm-commits at lists.llvm.org
Fri May 31 13:08:08 PDT 2024
https://github.com/e-kwsm created https://github.com/llvm/llvm-project/pull/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.
>From 85eb3c08e055a67b4682c1c13d63535f7f779300 Mon Sep 17 00:00:00 2001
From: Eisuke Kawashima <e-kwsm at users.noreply.github.com>
Date: Sun, 12 May 2024 00:06:53 +0900
Subject: [PATCH] fix(llvm/**.py): fix comparison to True/False
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.
---
llvm/utils/indirect_calls.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/utils/indirect_calls.py b/llvm/utils/indirect_calls.py
index 2bdabc8c4d74f..4c6c21771ad56 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 != None:
More information about the llvm-commits
mailing list