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 1313 {% set show_full_path = config.show_object_full_path %}
1414 {% endif %}
1515
16+ {% set attribute_name = attribute.path if show_full_path else attribute.name %}
17+
1618 {% if not root or config.show_root_heading %}
1719
1820 {% filter heading(heading_level,
2325
2426 {% block heading scoped %}
2527 {% 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 >
2729 {% else %}
2830 {%+ 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 %}
3132 {% if attribute.value %} = {{ attribute.value }}{% endif %}
3233 {% endfilter %}
3334 {% endif %}
4546 {% if config.separate_signature %}
4647 {% filter highlight(language="python", inline=False) %}
4748 {% 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 %}
5050 {% if attribute.value %} = {{ attribute.value|safe }}{% endif %}
5151 {% endfilter %}
5252 {% endfilter %}
Original file line number Diff line number Diff line change 1313 {% set show_full_path = config.show_object_full_path %}
1414 {% endif %}
1515
16+ {% set class_name = class.path if show_full_path else class.name %}
17+
1618 {% if not root or config.show_root_heading %}
1719
1820 {% filter heading(heading_level,
2325
2426 {% block heading scoped %}
2527 {% 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 >
2729 {% elif config.merge_init_into_class and "__init__" in class.members %}
2830 {% with function = class.members["__init__"] %}
2931 {%+ 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 %}
3233 {% endfilter %}
3334 {% endwith %}
3435 {% else %}
35- < code > {% if show_full_path %}{{ class.path }}{% else %}{{ class.name }}{% endif % }</ code >
36+ < code > {{ class_name } }</ code >
3637 {% endif %}
3738 {% endblock heading %}
3839
112113 {% endblock source %}
113114
114115 {% 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 %}
120119 {% endblock children %}
121120 {% endblock contents %}
122121 </ div >
Original file line number Diff line number Diff line change 1515 {% set show_full_path = config.show_object_full_path %}
1616 {% endif %}
1717
18+ {% set function_name = function.path if show_full_path else function.name %}
19+
1820 {% if not root or config.show_root_heading %}
1921
2022 {% filter heading(heading_level,
2527
2628 {% block heading scoped %}
2729 {% 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 >
2931 {% else %}
3032 {%+ 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 %}
3334 {% endfilter %}
3435 {% endif %}
3536 {% endblock heading %}
Original file line number Diff line number Diff line change 1313 {% set show_full_path = config.show_object_full_path %}
1414 {% endif %}
1515
16+ {% set module_name = module.path if show_full_path else module.name %}
17+
1618 {% if not root or config.show_root_heading %}
1719
1820 {% filter heading(heading_level,
2224 toc_label=module.name) %}
2325
2426 {% 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 %}
3232 {% endblock heading %}
3333
3434 {% block labels scoped %}
6060 {% endblock docstring %}
6161
6262 {% 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 %}
6866 {% endblock children %}
6967 {% endblock contents %}
7068 </ div >
You can’t perform that action at this time.
0 commit comments