Fix for unwanted NameError exception in static analysis with named params.

This commit is contained in:
Dave Halter
2014-12-12 14:52:34 +01:00
parent a762e0bcec
commit a4c454c103

View File

@@ -223,7 +223,10 @@ def get_module_statements(module):
c = child.children
if c[0] == '(' and c[1] != ')':
if c[1].type != 'arglist':
nodes.append(c[1])
if c[1].type == 'argument':
nodes.append(c[1].children[-1])
else:
nodes.append(c[1])
else:
for argument in c[1].children:
if argument.type == 'argument':