def rst(self, partial_path, full_path, doclet, use_short_name=False):
"""Return rendered RST about an entity with the given name and doclet."""
dotted_name = partial_path[-1] if use_short_name else _dotted_path(partial_path)
# Render to RST using Jinja:
env = Environment(loader=PackageLoader('sphinx_js', 'templates'))
template = env.get_template(self._template)
return template.render(**self._template_vars(dotted_name, full_path, doclet))
评论列表
文章目录