Workaround bug detecting MAKE_FUNCTION docstrings

This commit is contained in:
rocky
2020-06-26 07:17:31 -04:00
parent e3720515ae
commit 11be90758f
2 changed files with 16 additions and 2 deletions

View File

@@ -895,6 +895,12 @@ class SourceWalker(GenericASTTraversal, object):
doc_node = node[0]
if doc_node.attr:
docstring = doc_node.attr
if not isinstance(docstring, str):
# FIXME: we have mistakenly tagged something as a doc
# string in transform when it isn't one.
# The rule in n_mkfunc is pretty flaky.
self.prune()
return
else:
docstring = node[0].pattr