Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Prefer is/is not None.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 24 Oct 2020 19:24:10 +0000 (21:24 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 24 Oct 2020 19:24:26 +0000 (21:24 +0200)
docs/source/_ext/autodoxy.py
tools/stack-cleaner/as

index 5811d2a..e607ba9 100644 (file)
@@ -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."
index 1487401..48224e5 100755 (executable)
@@ -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)