1
0
forked from VimPlug/jedi

Move get_signatures from Function to FunctionMixin

This commit is contained in:
Dave Halter
2019-07-29 20:17:03 +02:00
parent 22580f771c
commit f9de26f72c
2 changed files with 6 additions and 11 deletions

View File

@@ -25,6 +25,7 @@ from jedi.evaluate.base_context import ContextualizedNode, \
from jedi.evaluate.context import ClassContext, ModuleContext, \
FunctionExecutionContext
from jedi.evaluate.context.klass import ClassMixin
from jedi.evaluate.context.function import FunctionMixin
from jedi.evaluate.context import iterable
from jedi.evaluate.lazy_context import LazyTreeContext, LazyKnownContext, \
LazyKnownContexts
@@ -656,7 +657,7 @@ class WrapsCallable(ContextWrapper):
return ContextSet({Wrapped(func, self._wrapped_context) for func in funcs})
class Wrapped(ContextWrapper):
class Wrapped(ContextWrapper, FunctionMixin):
def __init__(self, func, original_function):
super(Wrapped, self).__init__(func)
self._original_function = original_function
@@ -665,12 +666,6 @@ class Wrapped(ContextWrapper):
def name(self):
return self._original_function.name
def get_signatures(self):
return [
ReplacedNameSignature(sig, self._original_function.name)
for sig in self._wrapped_context.get_signatures()
]
class ReplacedNameSignature(SignatureWrapper):
def __init__(self, signature, name):