forked from VimPlug/jedi
Simplify some more call signature things
This commit is contained in:
@@ -8,7 +8,7 @@ class AbstractSignature(object):
|
||||
|
||||
@abstractproperty
|
||||
def name(self):
|
||||
raise NotImplementedError
|
||||
return self._context.name
|
||||
|
||||
def annotation(self):
|
||||
return None
|
||||
@@ -31,18 +31,6 @@ class TreeSignature(AbstractSignature):
|
||||
super(TreeSignature, self).__init__(context, is_bound)
|
||||
self._function_context = function_context or context
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
name = self._function_context.name
|
||||
if name.string_name == '__init__':
|
||||
try:
|
||||
class_context = self._function_context.class_context
|
||||
except AttributeError:
|
||||
pass
|
||||
else:
|
||||
return class_context.name
|
||||
return name
|
||||
|
||||
def bind(self, context):
|
||||
return TreeSignature(context, self._function_context, is_bound=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user