diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 08:35:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 08:35:51 +0000 |
commit | 641d0d615623d4818993e1967fc96af1eefc4605 (patch) | |
tree | c40f205eb559c8a495489262190a0be4f1829740 /docs/templates/python/material/class.html | |
parent | Adding upstream version 0.13.0. (diff) | |
download | anta-641d0d615623d4818993e1967fc96af1eefc4605.tar.xz anta-641d0d615623d4818993e1967fc96af1eefc4605.zip |
Adding upstream version 0.14.0.upstream/0.14.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/templates/python/material/class.html')
-rw-r--r-- | docs/templates/python/material/class.html | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/templates/python/material/class.html b/docs/templates/python/material/class.html new file mode 100644 index 0000000..940103b --- /dev/null +++ b/docs/templates/python/material/class.html @@ -0,0 +1,35 @@ +{% extends "_base/class.html" %} +{% set anta_test = namespace(found=false) %} +{% for base in class.bases %} +{% set basestr = base | string %} +{% if "AntaTest" == basestr %} +{% set anta_test.found = True %} +{% endif %} +{% endfor %} +{% block children %} +{% if anta_test.found %} + {% set root = False %} + {% set heading_level = heading_level + 1 %} + {% include "anta_test.html" with context %} + {# render source after children - TODO make add flag to respect disabling it.. though do we want to disable?#} + <details class="quote"> + <summary>Source code in <code> + {%- if class.relative_filepath.is_absolute() -%} + {{ class.relative_package_filepath }} + {%- else -%} + {{ class.relative_filepath }} + {%- endif -%} + </code></summary> + {{ class.source|highlight(language="python", linestart=class.lineno, linenums=True) }} + </details> +{% else %} + {{ super() }} +{% endif %} +{% endblock children %} + +{# Do not render source before children for AntaTest #} +{% block source %} +{% if not anta_test.found %} + {{ super() }} +{% endif %} +{% endblock source %} |