mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-02 10:13:22 +08:00
Function -> FunctionContext and fakes use the FunctionContext, too.
This commit is contained in:
@@ -6,7 +6,7 @@ from abc import abstractmethod
|
||||
|
||||
from jedi.parser.tree import search_ancestor
|
||||
from jedi.evaluate import flow_analysis
|
||||
from jedi.common import to_list
|
||||
from jedi.common import to_list, unite
|
||||
|
||||
|
||||
class AbstractNameDefinition():
|
||||
@@ -28,6 +28,12 @@ class AbstractNameDefinition():
|
||||
return '<%s: %s>' % (type(self).__name__, self.string_name)
|
||||
return '<%s: %s@%s>' % (type(self).__name__, self.string_name, self.start_pos)
|
||||
|
||||
def execute(self, arguments):
|
||||
return unite(context.execute(arguments) for context in self.infer())
|
||||
|
||||
def execute_evaluated(self, *args, **kwargs):
|
||||
return unite(context.execute(*args, **kwargs) for context in self.infer())
|
||||
|
||||
|
||||
class ContextName(AbstractNameDefinition):
|
||||
def __init__(self, parent_context, name):
|
||||
|
||||
Reference in New Issue
Block a user