forked from VimPlug/jedi
Remove old indent/dedent usages. Now they are not needed anymore.
This commit is contained in:
@@ -134,7 +134,7 @@ def _evaluate_for_statement_string(evaluator, string, module):
|
||||
p = ParserWithRecovery(load_grammar(), code % indent_block(string))
|
||||
try:
|
||||
pseudo_cls = p.module.subscopes[0]
|
||||
# First pick suite, then simple_stmt (-2 for DEDENT) and then the node,
|
||||
# First pick suite, then simple_stmt and then the node,
|
||||
# which is also not the last item, because there's a newline.
|
||||
stmt = pseudo_cls.children[-1].children[-1].children[-2]
|
||||
except (AttributeError, IndexError):
|
||||
|
||||
@@ -27,7 +27,7 @@ def deep_ast_copy(obj, parent=None, new_elements=None):
|
||||
for child in obj.children:
|
||||
typ = child.type
|
||||
if typ in ('newline', 'operator', 'keyword', 'number', 'string',
|
||||
'indent', 'dedent', 'endmarker', 'error_leaf'):
|
||||
'endmarker', 'error_leaf'):
|
||||
# At the moment we're not actually copying those primitive
|
||||
# elements, because there's really no need to. The parents are
|
||||
# obviously wrong, but that's not an issue.
|
||||
|
||||
Reference in New Issue
Block a user