schrodinger.infra.epydoc_to_sphinx module

Code for converting epytext docstrings so they can be used in Sphinx. This module may be used as either a Sphinx plugin to allow sphinx-build to parse epytext, or as a command line program to convert files from epytext to reST.


Hook up process_docstring so it can convert all docstrings. This function is called automatically by Sphinx.


app (sphinx.Sphinx) – The currently running Sphinx instance.

schrodinger.infra.epydoc_to_sphinx.process_docstring(app, what, name, obj, options, lines)

Convert the given docstring from Epytext to Sphinx reST format.


lines (list(str)) – A list of all lines in the docstring to convert. This list will be modified in place.

All other arguments are ignored and are present only for compatibility with the autodoc-process-docstring connection.

schrodinger.infra.epydoc_to_sphinx.convert_file(filename, all_triple_quoted_strings=False)

Convert the specified file from epytext to reST.

  • filename (str) – The name of the file to convert.

  • all_triple_quoted_strings (bool) – Whether to convert all comments enclosed within triple quotes or only proper doc strings