forked from VimPlug/jedi
Fix crazier subscript operations
This commit is contained in:
@@ -356,8 +356,12 @@ class SequenceLiteralContext(Sequence):
|
|||||||
yield LazyKnownContexts(types)
|
yield LazyKnownContexts(types)
|
||||||
else:
|
else:
|
||||||
for node in self.get_tree_entries():
|
for node in self.get_tree_entries():
|
||||||
yield LazyTreeContext(self._defining_context, node)
|
if node == ':' or node.type == 'subscript':
|
||||||
|
# TODO this should probably use at least part of the code
|
||||||
|
# of eval_subscript_list.
|
||||||
|
yield LazyKnownContext(Slice(self._defining_context, None, None, None))
|
||||||
|
else:
|
||||||
|
yield LazyTreeContext(self._defining_context, node)
|
||||||
for addition in check_array_additions(self._defining_context, self):
|
for addition in check_array_additions(self._defining_context, self):
|
||||||
yield addition
|
yield addition
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,14 @@ b[:]
|
|||||||
|
|
||||||
#? int()
|
#? int()
|
||||||
b[:, 1]
|
b[:, 1]
|
||||||
|
#? int()
|
||||||
|
b[:1, 1]
|
||||||
|
#? int()
|
||||||
|
b[1:1, 1]
|
||||||
|
#? int()
|
||||||
|
b[1:1:, ...]
|
||||||
|
#? int()
|
||||||
|
b[1:1:5, ...]
|
||||||
|
|
||||||
class _StrangeSlice():
|
class _StrangeSlice():
|
||||||
def __getitem__(self, sliced):
|
def __getitem__(self, sliced):
|
||||||
|
|||||||
Reference in New Issue
Block a user