1
0
forked from VimPlug/jedi

python3.5 uses 'argument' node type, not 'arglist' for * and ** arguments

This commit is contained in:
Claude
2016-02-09 12:06:16 +01:00
parent 3b0dcb3fcb
commit de98cda2d7

View File

@@ -47,7 +47,10 @@ class Arguments(tree.Base):
for el in self.argument_node:
yield 0, el
else:
if not tree.is_node(self.argument_node, 'arglist'):
if not (tree.is_node(self.argument_node, 'arglist') or (
# in python 3.5 **arg is an argument, not arglist
(tree.is_node(self.argument_node, 'argument') and
self.argument_node.children[0] in ('*', '**')))):
yield 0, self.argument_node
return