From: Arnaud Giersch Date: Sat, 24 Oct 2020 19:24:10 +0000 (+0200) Subject: Prefer is/is not None. X-Git-Tag: v3.26~239 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9207441713687a778ea97ffc4142fa5e303e52a5 Prefer is/is not None. --- 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)