def add_line(self, line, source, *lineno):
    """Append one line of generated reST to the output."""
print(self.indent + line)
self.directive.result.append(self.indent + line, source, *lineno)
Make Sphinx generate RST class documentation from pydoc