File tree Expand file tree Collapse file tree 4 files changed +27
-29
lines changed
src/mkdocstrings_handlers/python/templates/material/_base Expand file tree Collapse file tree 4 files changed +27
-29
lines changed Original file line number Diff line number Diff line change 13
13
{% set show_full_path = config.show_object_full_path %}
14
14
{% endif %}
15
15
16
+ {% set attribute_name = attribute.path if show_full_path else attribute.name %}
17
+
16
18
{% if not root or config.show_root_heading %}
17
19
18
20
{% filter heading(heading_level,
23
25
24
26
{% block heading scoped %}
25
27
{% if config.separate_signature %}
26
- < span class ="doc doc-object-name doc-attribute-name "> {% if show_full_path %}{{ attribute.path }}{% else %}{{ attribute.name }}{% endif % }</ span >
28
+ < span class ="doc doc-object-name doc-attribute-name "> {{ attribute_name } }</ span >
27
29
{% else %}
28
30
{%+ filter highlight(language="python", inline=True) %}
29
- {% if show_full_path %}{{ attribute.path }}{% else %}{{ attribute.name }}{% endif %}
30
- {% if attribute.annotation %}: {{ attribute.annotation }}{% endif %}
31
+ {{ attribute_name }}{% if attribute.annotation %}: {{ attribute.annotation }}{% endif %}
31
32
{% if attribute.value %} = {{ attribute.value }}{% endif %}
32
33
{% endfilter %}
33
34
{% endif %}
45
46
{% if config.separate_signature %}
46
47
{% filter highlight(language="python", inline=False) %}
47
48
{% filter format_code(config.line_length) %}
48
- {{ attribute.name }}
49
- {% if attribute.annotation %}: {{ attribute.annotation|safe }}{% endif %}
49
+ {{ attribute.name }}{% if attribute.annotation %}: {{ attribute.annotation|safe }}{% endif %}
50
50
{% if attribute.value %} = {{ attribute.value|safe }}{% endif %}
51
51
{% endfilter %}
52
52
{% endfilter %}
Original file line number Diff line number Diff line change 13
13
{% set show_full_path = config.show_object_full_path %}
14
14
{% endif %}
15
15
16
+ {% set class_name = class.path if show_full_path else class.name %}
17
+
16
18
{% if not root or config.show_root_heading %}
17
19
18
20
{% filter heading(heading_level,
23
25
24
26
{% block heading scoped %}
25
27
{% if config.separate_signature %}
26
- < span class ="doc doc-object-name doc-class-name "> {% if show_full_path %}{{ class.path }}{% else %}{{ class.name }}{% endif % }</ span >
28
+ < span class ="doc doc-object-name doc-class-name "> {{ class_name } }</ span >
27
29
{% elif config.merge_init_into_class and "__init__" in class.members %}
28
30
{% with function = class.members["__init__"] %}
29
31
{%+ filter highlight(language="python", inline=True) %}
30
- {% if show_full_path %}{{ class.path }}{% else %}{{ class.name }}{% endif %}
31
- {% include "signature.html" with context %}
32
+ {{ class_name }}{% include "signature.html" with context %}
32
33
{% endfilter %}
33
34
{% endwith %}
34
35
{% else %}
35
- < code > {% if show_full_path %}{{ class.path }}{% else %}{{ class.name }}{% endif % }</ code >
36
+ < code > {{ class_name } }</ code >
36
37
{% endif %}
37
38
{% endblock heading %}
38
39
112
113
{% endblock source %}
113
114
114
115
{% block children scoped %}
115
- {% with obj = class %}
116
- {% set root = False %}
117
- {% set heading_level = heading_level + 1 %}
118
- {% include "children.html" with context %}
119
- {% endwith %}
116
+ {% set root = False %}
117
+ {% set heading_level = heading_level + 1 %}
118
+ {% include "children.html" with context %}
120
119
{% endblock children %}
121
120
{% endblock contents %}
122
121
</ div >
Original file line number Diff line number Diff line change 15
15
{% set show_full_path = config.show_object_full_path %}
16
16
{% endif %}
17
17
18
+ {% set function_name = function.path if show_full_path else function.name %}
19
+
18
20
{% if not root or config.show_root_heading %}
19
21
20
22
{% filter heading(heading_level,
25
27
26
28
{% block heading scoped %}
27
29
{% if config.separate_signature %}
28
- < span class ="doc doc-object-name doc-function-name "> {% if show_full_path %}{{ function.path }}{% else %}{{ function.name }}{% endif % }</ span >
30
+ < span class ="doc doc-object-name doc-function-name "> {{ function_name } }</ span >
29
31
{% else %}
30
32
{%+ filter highlight(language="python", inline=True) %}
31
- {% if show_full_path %}{{ function.path }}{% else %}{{ function.name }}{% endif %}
32
- {% include "signature.html" with context %}
33
+ {{ function_name }}{% include "signature.html" with context %}
33
34
{% endfilter %}
34
35
{% endif %}
35
36
{% endblock heading %}
Original file line number Diff line number Diff line change 13
13
{% set show_full_path = config.show_object_full_path %}
14
14
{% endif %}
15
15
16
+ {% set module_name = module.path if show_full_path else module.name %}
17
+
16
18
{% if not root or config.show_root_heading %}
17
19
18
20
{% filter heading(heading_level,
22
24
toc_label=module.name) %}
23
25
24
26
{% block heading scoped %}
25
- {% with module_name = module.path if show_full_path else module.name %}
26
- {% if config.separate_signature %}
27
- < span class ="doc doc-object-name doc-module-name "> {{ module_name }}</ span >
28
- {% else %}
29
- < code > {{ module_name }}</ code >
30
- {% endif %}
31
- {% endwith %}
27
+ {% if config.separate_signature %}
28
+ < span class ="doc doc-object-name doc-module-name "> {{ module_name }}</ span >
29
+ {% else %}
30
+ < code > {{ module_name }}</ code >
31
+ {% endif %}
32
32
{% endblock heading %}
33
33
34
34
{% block labels scoped %}
60
60
{% endblock docstring %}
61
61
62
62
{% block children scoped %}
63
- {% with obj = module %}
64
- {% set root = False %}
65
- {% set heading_level = heading_level + 1 %}
66
- {% include "children.html" with context %}
67
- {% endwith %}
63
+ {% set root = False %}
64
+ {% set heading_level = heading_level + 1 %}
65
+ {% include "children.html" with context %}
68
66
{% endblock children %}
69
67
{% endblock contents %}
70
68
</ div >
You can’t perform that action at this time.
0 commit comments