Fix a weird AttributeError, fixes #1765

This commit is contained in:
Dave Halter committed 2022-11-13 18:26:01 +01:00
1 parent 85780111e0
commit 6e5db3f479
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -306,7 +306,7 @@ def _iter_arguments(nodes, position):
first = node.children[0]
second = node.children[1]
if second == '=':
if second.start_pos < position:
if second.start_pos < position and first.type == 'name':
yield 0, first.value, True
else:
yield 0, remove_after_pos(first), False