1
0
forked from VimPlug/jedi

Test extracing of base classes

This commit is contained in:
Dave Halter
2020-02-17 10:06:40 +01:00
parent ab4fe548f2
commit 7dff25f7c9
2 changed files with 29 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ _INLINE_NEEDS_BRACKET = (
'xor_expr and_expr shift_expr arith_expr term factor power atom_expr '
'or_test and_test not_test comparison'
).split()
_EXTRACT_USE_PARENT = _INLINE_NEEDS_BRACKET + ['trailer']
_DEFINITION_SCOPES = ('suite', 'file_input')
_NON_EXCTRACABLE = ('param', )
@@ -228,7 +229,7 @@ def extract_variable(grammar, path, module_node, new_name, pos, until_pos):
node = start_leaf
if node.type == 'operator':
node = node.parent
while node.parent.type in _INLINE_NEEDS_BRACKET:
while node.parent.type in _EXTRACT_USE_PARENT:
node = node.parent
start_leaf
extracted = node.get_code(include_prefix=False)