1
0
forked from VimPlug/jedi

Fix names selection and params, fixes #1283

This commit is contained in:
Dave Halter
2019-02-26 00:20:14 +01:00
parent eac69aef2b
commit 94f2677752
4 changed files with 23 additions and 3 deletions

View File

@@ -243,6 +243,9 @@ def get_parent_scope(node, include_flows=False):
Returns the underlying scope.
"""
scope = node.parent
if scope.type in ('funcdef', 'classdef') and scope.name == node:
scope = scope.parent
while scope is not None:
if include_flows and isinstance(scope, tree.Flow):
return scope