Skip to content

Commit 0f57e39

Browse files
committed
fix(clang-tools-extra/**.py): fix comparison to None
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.
1 parent 435e5c1 commit 0f57e39

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ bool IdentifierNamingCheck::isParamInMainLikeFunction(
10711071
if (!IsIntType(FDecl->parameters()[0]->getType()))
10721072
return false;
10731073
MainType Type = IsCharPtrPtr(FDecl->parameters()[1]->getType());
1074-
if (Type == None)
1074+
if (Type is None)
10751075
return false;
10761076
if (FDecl->getNumParams() == 3 &&
10771077
IsCharPtrPtr(FDecl->parameters()[2]->getType()) != Type)

clang-tools-extra/docs/clang-tidy/checks/gen-static-analyzer-docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def get_checkers(checkers_td, checkers_rst):
4747
parent_package_ = package["ParentPackage"]
4848
hidden = (checker["Hidden"] != 0) or (package["Hidden"] != 0)
4949

50-
while parent_package_ != None:
50+
while parent_package_ is not None:
5151
parent_package = table_entries[parent_package_["def"]]
5252
checker_package_prefix = (
5353
parent_package["PackageName"] + "." + checker_package_prefix

0 commit comments

Comments
 (0)