1
0
forked from VimPlug/jedi

Dynamic array checking in combination with FakeSequences might have caused an exception.

This commit is contained in:
Dave Halter
2014-12-10 11:42:02 +01:00
parent 4bef8895a0
commit 5af665abd8

View File

@@ -425,7 +425,13 @@ def check_array_additions(evaluator, array):
return []
is_list = array.type == 'list'
current_module = array.atom.get_parent_until()
try:
current_module = array.atom.get_parent_until()
except AttributeError:
# If there's no get_parent_until, it's a FakeSequence or another Fake
# type. Those fake types are used inside Jedi's engine. No values may
# be added to those after their creation.
return []
return _check_array_additions(evaluator, array, current_module, is_list)