forked from VimPlug/jedi
Fix some minor signature issues
This commit is contained in:
@@ -50,17 +50,20 @@ class AbstractSignature(_SignatureMixin):
|
||||
return param_names[1:]
|
||||
return param_names
|
||||
|
||||
def bind(self, context):
|
||||
def bind(self, context, function_context=None):
|
||||
raise NotImplementedError
|
||||
|
||||
def __repr__(self):
|
||||
return '<%s: %s, %s>' % (self.__class__.__name__, self.context, self._function_context)
|
||||
|
||||
|
||||
class TreeSignature(AbstractSignature):
|
||||
def __init__(self, context, function_context=None, is_bound=False):
|
||||
super(TreeSignature, self).__init__(context, is_bound)
|
||||
self._function_context = function_context or context
|
||||
|
||||
def bind(self, context):
|
||||
return TreeSignature(context, self._function_context, is_bound=True)
|
||||
def bind(self, context, function_context=None):
|
||||
return TreeSignature(context, function_context or self._function_context, is_bound=True)
|
||||
|
||||
@property
|
||||
def _annotation(self):
|
||||
@@ -98,7 +101,7 @@ class BuiltinSignature(AbstractSignature):
|
||||
def _function_context(self):
|
||||
return self.context
|
||||
|
||||
def bind(self, context):
|
||||
def bind(self, context, function_context=None):
|
||||
assert not self.is_bound
|
||||
return BuiltinSignature(context, self._return_string, is_bound=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user