From 9207441713687a778ea97ffc4142fa5e303e52a5 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Sat, 24 Oct 2020 21:24:10 +0200 Subject: [PATCH] Prefer is/is not None. --- docs/source/_ext/autodoxy.py | 4 ++-- tools/stack-cleaner/as | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/_ext/autodoxy.py b/docs/source/_ext/autodoxy.py index 5811d2af70..e607ba9140 100644 --- a/docs/source/_ext/autodoxy.py +++ b/docs/source/_ext/autodoxy.py @@ -407,7 +407,7 @@ class DoxygenMethodDocumenter(DoxygenDocumenter): xpath_query_noparam = ('{:s}/memberdef[@kind="function"]/name[text()="{:s}"]/..').format(prefix, meth) xpath_query = "" - if self.argsstring != None: + if self.argsstring is not None: xpath_query = ('{:s}/memberdef[@kind="function" and argsstring/text()="{:s}"]/name[text()="{:s}"]/..').format(prefix,self.argsstring,meth) else: xpath_query = xpath_query_noparam @@ -415,7 +415,7 @@ class DoxygenMethodDocumenter(DoxygenDocumenter): if not match: logger = logging.getLogger(__name__) - if self.argsstring != None: + if self.argsstring is not None: candidates = get_doxygen_root().xpath(xpath_query_noparam) if len(candidates) == 1: logger.warning("[autodoxy] Using method '{}{}{}' instead of '{}{}{}'. You may want to drop your specification of the signature, or to fix it." diff --git a/tools/stack-cleaner/as b/tools/stack-cleaner/as index 148740142d..48224e53e1 100755 --- a/tools/stack-cleaner/as +++ b/tools/stack-cleaner/as @@ -30,7 +30,7 @@ while i < len(sys.argv): else: input_filename = sys.argv[i] i = i + 1 -if input_filename == None: +if input_filename is None: sys.stderr.write("Missing input file\n") sys.exit(1) -- 2.20.1