mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-20 01:27:05 +08:00
Define Name.docstr as a proxy for Statement.docstr
This commit is contained in:
1 parent
740f27c8b8
commit
b6839fb264
1 file changed
+5
@@ -1271,6 +1271,11 @@ class Name(Simple):
|
||||
""" Returns the names in a full string format """
|
||||
return ".".join(self.names)
|
||||
|
||||
@property
|
||||
def docstr(self):
|
||||
"""Return attribute docstring (PEP 257) if exists."""
|
||||
return self.parent.docstr
|
||||
|
||||
def __str__(self):
|
||||
return self.get_code()
|
||||
|
||||
|
||||
Reference in new issue
Block a user