We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 857d89d + 5752ec8 commit e1b9599Copy full SHA for e1b9599
python/asthelper.py
@@ -99,7 +99,7 @@ def visit_FunctionDef(self, node):
99
if self.parent:
100
for arg in node.args.args:
101
self.arguments.append(arg.arg)
102
- if self.arguments[0] == 'self' or self.arguments[0] == 'cls':
+ if len(self.arguments) > 0 and (self.arguments[0] == 'self' or self.arguments[0] == 'cls'):
103
self.arguments.pop(0)
104
105
self.returns = new_visitor.returns
0 commit comments