Fixed an issue in the doc style checker related to a slightly changed AST in Python 3.4.

Tue, 25 Nov 2014 19:16:34 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 25 Nov 2014 19:16:34 +0100
changeset 3938
d2b103d42907
parent 3937
607dd5b0079b
child 3939
fc1ea4bbb201

Fixed an issue in the doc style checker related to a slightly changed AST in Python 3.4.

Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py file | annotate | diff | comparison | revisions
diff -r 607dd5b0079b -r d2b103d42907 Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py
--- a/Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py	Mon Nov 24 18:39:19 2014 +0100
+++ b/Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py	Tue Nov 25 19:16:34 2014 +0100
@@ -445,12 +445,18 @@
             arguments = []
             arguments.extend([arg.arg for arg in node.args.args])
             if node.args.vararg is not None:
-                arguments.append(node.args.vararg)
+                if sys.version_info[1] < 4:
+                    arguments.append(node.args.vararg)
+                else:
+                    arguments.append(node.args.vararg.arg)
             
             kwarguments = []
             kwarguments.extend([arg.arg for arg in node.args.kwonlyargs])
             if node.args.kwarg is not None:
-                kwarguments.append(node.args.kwarg)
+                if sys.version_info[1] < 4:
+                    kwarguments.append(node.args.kwarg)
+                else:
+                    kwarguments.append(node.args.kwarg.arg)
             return arguments, kwarguments
     
     ##################################################################

eric ide

mercurial