Skip to content

Commit daaaf4e

Browse files
authored
[analyzer][NFC] Fix comparison to True/False (#94038)
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 <[email protected]>
1 parent 0864501 commit daaaf4e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang/tools/scan-build/bin/set-xcode-analyzer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def main():
107107
foundSpec = True
108108
ModifySpec(x, isBuiltinAnalyzer, path)
109109

110-
if foundSpec == False:
110+
if not foundSpec:
111111
print "(-) No compiler configuration file was found. Xcode's analyzer has not been updated."
112112

113113
if __name__ == '__main__':

clang/utils/check_cfc/check_cfc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def get_output_file(args):
156156
elif arg.startswith("-o"):
157157
# Specified conjoined with -o
158158
return arg[2:]
159-
assert grabnext == False
159+
assert not grabnext
160160

161161
return None
162162

@@ -182,7 +182,7 @@ def replace_output_file(args, new_name):
182182
if replaceidx is None:
183183
raise Exception
184184
replacement = new_name
185-
if attached == True:
185+
if attached:
186186
replacement = "-o" + new_name
187187
args[replaceidx] = replacement
188188
return args

0 commit comments

Comments
 (0)