1
0
forked from VimPlug/jedi

FunctionContext should be created from a unified interface

This commit is contained in:
Dave Halter
2018-08-02 17:15:44 +02:00
parent 481e6bcff0
commit a1314ac3c1
4 changed files with 11 additions and 13 deletions
+2 -3
View File
@@ -216,7 +216,7 @@ class Evaluator(object):
if type_ == 'classdef':
return [ClassContext(self, context, name.parent)]
elif type_ == 'funcdef':
return [FunctionContext(self, context, name.parent)]
return [FunctionContext.from_context(context, name.parent)]
if type_ == 'expr_stmt':
is_simple_name = name.parent.type not in ('power', 'trailer')
@@ -340,8 +340,7 @@ class Evaluator(object):
parent_context.parent_context, scope_node
)
else:
func = FunctionContext(
self,
func = FunctionContext.from_context(
parent_context,
scope_node
)