mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-31 02:15:23 +08:00
Docstrings for classes should use the class name and not __init__
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
from abc import abstractproperty
|
||||
from jedi.parser_utils import get_call_signature
|
||||
|
||||
|
||||
@@ -7,7 +6,7 @@ class AbstractSignature(object):
|
||||
self.context = context
|
||||
self.is_bound = is_bound
|
||||
|
||||
@abstractproperty
|
||||
@property
|
||||
def name(self):
|
||||
return self.context.name
|
||||
|
||||
@@ -39,7 +38,10 @@ class TreeSignature(AbstractSignature):
|
||||
return self._function_context.tree_node.annotation
|
||||
|
||||
def to_string(self, normalize=False):
|
||||
return get_call_signature(self._function_context.tree_node)
|
||||
return get_call_signature(
|
||||
self._function_context.tree_node,
|
||||
call_string=self.name.string_name,
|
||||
)
|
||||
|
||||
|
||||
class BuiltinSignature(AbstractSignature):
|
||||
@@ -47,5 +49,8 @@ class BuiltinSignature(AbstractSignature):
|
||||
def _function_context(self):
|
||||
return self.context
|
||||
|
||||
def to_string(self):
|
||||
return ''
|
||||
|
||||
def bind(self, context):
|
||||
raise NotImplementedError('pls implement, need test case, %s' % context)
|
||||
|
||||
Reference in New Issue
Block a user