1
0
forked from VimPlug/jedi

Fix a few remaining issues about the current branch

This commit is contained in:
Dave Halter
2019-04-14 18:44:58 +02:00
parent 6ced926db0
commit 2f562040ac
3 changed files with 11 additions and 10 deletions

View File

@@ -439,12 +439,9 @@ class Evaluator(object):
if parent_was_class:
parent_context = AnonymousInstance(
self, parent_context.parent_context, parent_context)
cls = MethodContext
else:
cls = FunctionContext
func = cls.from_context(parent_context, scope_node)
func = next(iter(stubify(func)))
func = FunctionContext.from_context(parent_context, scope_node)
func = next(iter(stubify(parent_context, func)))
if parent_was_class:
func = BoundMethod(

View File

@@ -266,6 +266,8 @@ def _add_stub_if_possible(parent_context, actual_context, stub_contexts):
def with_stub_context_if_possible(actual_context):
if actual_context.tree_node.type == 'lambdef':
return ContextSet([actual_context])
assert actual_context.tree_node.type in ('classdef', 'funcdef')
qualified_names = actual_context.get_qualified_names()
stub_module = actual_context.get_root_context().stub_context