sphinx-autoapi/autoapi/templates/python/class.rst
Ashley Whetter a4f798183c Fixed private submodules displaying when private-members turned off
Also fixed whitespace issues in templates.
2019-03-05 22:52:13 -08:00

26 lines
851 B
ReStructuredText

{% if obj.display %}
.. py:{{ obj.type }}:: {{ obj.short_name }}{% if obj.args %}({{ obj.args }}){% endif %}
{% if obj.bases %}
Bases: {% for base in obj.bases %}:class:`{{ base }}`{% if not loop.last %}, {% endif %}{% endfor %}
{% endif %}
{% if obj.docstring %}
{{ obj.docstring|prepare_docstring|indent(3) }}
{% endif %}
{% set visible_classes = obj.classes|selectattr("display")|list %}
{% for klass in visible_classes %}
{{ klass.rendered|indent(3) }}
{% endfor %}
{% set visible_attributes = obj.attributes|selectattr("display")|list %}
{% for attribute in visible_attributes %}
{{ attribute.rendered|indent(3) }}
{% endfor %}
{% set visible_methods = obj.methods|selectattr("display")|list %}
{% for method in visible_methods %}
{{ method.rendered|indent(3) }}
{% endfor %}
{% endif %}