class plasmapy_sphinx.automodsumm.generate.AutomodsummRenderer(app: Union[Builder, Sphinx], template_dir: str = None)

Bases: sphinx.ext.autosummary.generate.AutosummaryRenderer

A helper class for retrieving and rendering automodsumm templates when writing stub files.


Methods Summary


Check if template file exists.

render(template_name, context)

Render a template file.

Methods Documentation

exists(template_name: str) bool

Check if template file exists.

render(template_name: str, context: Dict) str

Render a template file. The render will first search for the template in the path specified by the sphinx configuration value templates_path, then the templates_dir, and finally the autosummary templates directory. Upon finding the template, the values from the context dictionary will inserted into the template and returned.

  • template_name (str) – Name of the template file.

  • context (dict) – Dictionary of values to be rendered (inserted) into the template.