fix format string argument error found by pylint '(too-many-format-args) Too many arguments for format string'
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 10 Oct 2017 13:43:55 +0300
changeset 1860 4eeddef7f973
parent 1859 1df77c809257
child 1861 410a3bcbeb29
fix format string argument error found by pylint '(too-many-format-args) Too many arguments for format string'
tests/tools/check_source.sh
xmlclass/xmlclass.py
--- a/tests/tools/check_source.sh	Tue Oct 10 13:33:46 2017 +0300
+++ b/tests/tools/check_source.sh	Tue Oct 10 13:43:55 2017 +0300
@@ -237,6 +237,7 @@
     enable=$enable,W0107          # (unnecessary-pass) Unnecessary pass statement
     enable=$enable,W0406          # (import-self) Module import itself
     enable=$enable,C0413          # (wrong-import-position) Import "import X" should be placed at the top of the module
+    enable=$enable,E1305          # (too-many-format-args) Too many arguments for format string
     # enable=
 
     options=
--- a/xmlclass/xmlclass.py	Tue Oct 10 13:33:46 2017 +0300
+++ b/xmlclass/xmlclass.py	Tue Oct 10 13:43:55 2017 +0300
@@ -1231,7 +1231,7 @@
             return "(?:%s){1,%d}" % (name, infos["maxOccurs"])
     else:
         if infos["maxOccurs"] == "unbounded":
-            return "(?:%s){%d,}" % (name, infos["minOccurs"], name)
+            return "(?:%s){%d,}" % (name, infos["minOccurs"])
         else:
             return "(?:%s){%d,%d}" % (name,
                                       infos["minOccurs"],