Go over docstring handling

This commit is contained in:
rocky
2020-02-02 05:37:07 -05:00
parent de1e7d423c
commit 38e2b8a10b
2 changed files with 9 additions and 4 deletions

View File

@@ -884,7 +884,11 @@ class SourceWalker(GenericASTTraversal, object):
def n_docstring(self, node):
indent = self.indent
docstring = node[0].pattr
doc_node = node[0]
if doc_node.attr:
docstring = doc_node.attr
else:
docstring = node[0].pattr
quote = '"""'
if docstring.find(quote) >= 0: