Better annotation signature string for classes
This commit is contained in:
1 parent
3bec1a6938
commit
b2b08ab432
1 file changed
+4
@@ -39,6 +39,10 @@ class TreeSignature(AbstractSignature):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def annotation(self):
|
def annotation(self):
|
||||||
|
# Classes don't need annotations, even if __init__ has one. They always
|
||||||
|
# return themselves.
|
||||||
|
if self.context.is_class():
|
||||||
|
return None
|
||||||
return self._function_context.tree_node.annotation
|
return self._function_context.tree_node.annotation
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user