forked from PrefectHQ/prefect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
method.html
67 lines (55 loc) · 2.13 KB
/
method.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{{ log.debug() }}
{% if config.show_if_no_docstring or method.has_contents %}
<div class="prefect-container">
<div class="doc doc-object doc-method">
<a class="prefect-heading" href="#{{ method.path }}">
{% with html_id = method.path %}
{% if not root or config.show_root_heading %}
{% if root %}
{% set show_full_path = config.show_root_full_path %}
{% set root_members = True %}
{% elif root_members %}
{% set show_full_path = config.show_root_members_full_path or config.show_object_full_path %}
{% set root_members = False %}
{% else %}
{% set show_full_path = config.show_object_full_path %}
{% endif %}
{% filter heading(heading_level,
role="method",
id=html_id,
class="doc doc-heading ",
toc_label=method.name ~ "()") %}
{% filter highlight(language="python", inline=True) %}
{% if show_full_path %}{{ method.path }}{% else %}{{ class.name + "." + method.name }}{% endif %}
{% endfilter %}
{% with properties = method.properties %}
{% include "properties.html" with context %}
{% endwith %}
{% endfilter %}
{% else %}
{% if config.show_root_toc_entry %}
{% filter heading(heading_level,
role="method",
id=html_id,
toc_label=method.path,
hidden=True) %}
{% endfilter %}
{% endif %}
{% set heading_level = heading_level - 1 %}
{% endif %}
</a>
<div class="doc doc-contents {% if root %}first{% endif %}">
{% with docstring_sections = method.docstring_sections %}
{% include "docstring.html" with context %}
{% endwith %}
{% if config.show_source and method.source %}
<details class="quote">
<summary>Source code in <code>{{ method.relative_file_path }}</code></summary>
{{ method.source.code|highlight(language="python", linestart=method.source.line_start, linenums=False) }}
</details>
{% endif %}
</div>
{% endwith %}
</div>
</div>
{% endif %}