mkdocstrings-python 1.5.0__tar.gz → 1.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/PKG-INFO +2 -2
  2. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/pyproject.toml +2 -2
  3. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/handler.py +9 -3
  4. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html +7 -7
  5. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/children.html +6 -6
  6. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/class.html +15 -16
  7. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/function.html +7 -6
  8. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/module.html +11 -13
  9. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/LICENSE +0 -0
  10. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/README.md +0 -0
  11. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/py.typed +0 -0
  12. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/__init__.py +0 -0
  13. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/rendering.py +0 -0
  14. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html +0 -0
  15. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html +0 -0
  16. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html +0 -0
  17. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html +0 -0
  18. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html +0 -0
  19. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html +0 -0
  20. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html +0 -0
  21. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html +0 -0
  22. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html +0 -0
  23. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html +0 -0
  24. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html +0 -0
  25. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html +0 -0
  26. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html +0 -0
  27. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html +0 -0
  28. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/expression.html +0 -0
  29. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/labels.html +0 -0
  30. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/languages/en.html +0 -0
  31. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/languages/ja.html +0 -0
  32. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/languages/zh.html +0 -0
  33. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/_base/signature.html +0 -0
  34. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/attribute.html +0 -0
  35. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/children.html +0 -0
  36. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/class.html +0 -0
  37. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/docstring/admonition.html +0 -0
  38. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/docstring/attributes.html +0 -0
  39. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/docstring/classes.html +0 -0
  40. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/docstring/examples.html +0 -0
  41. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/docstring/functions.html +0 -0
  42. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/docstring/modules.html +0 -0
  43. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/docstring/other_parameters.html +0 -0
  44. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/docstring/parameters.html +0 -0
  45. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/docstring/raises.html +0 -0
  46. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/docstring/receives.html +0 -0
  47. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/docstring/returns.html +0 -0
  48. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/docstring/warns.html +0 -0
  49. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/docstring/yields.html +0 -0
  50. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/docstring.html +0 -0
  51. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/expression.html +0 -0
  52. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/function.html +0 -0
  53. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/labels.html +0 -0
  54. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/language.html +0 -0
  55. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/languages/en.html +0 -0
  56. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/languages/ja.html +0 -0
  57. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/languages/zh.html +0 -0
  58. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/module.html +0 -0
  59. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/signature.html +0 -0
  60. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/material/style.css +0 -0
  61. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/attributes.html +0 -0
  62. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/other_parameters.html +0 -0
  63. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/parameters.html +0 -0
  64. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/raises.html +0 -0
  65. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/receives.html +0 -0
  66. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/returns.html +0 -0
  67. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/warns.html +0 -0
  68. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/yields.html +0 -0
  69. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/readthedocs/language.html +0 -0
  70. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/readthedocs/languages/en.html +0 -0
  71. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/readthedocs/languages/ja.html +0 -0
  72. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/readthedocs/languages/zh.html +0 -0
  73. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/src/mkdocstrings_handlers/python/templates/readthedocs/style.css +0 -0
  74. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/tests/__init__.py +0 -0
  75. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/tests/conftest.py +0 -0
  76. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/tests/test_handler.py +0 -0
  77. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/tests/test_rendering.py +0 -0
  78. {mkdocstrings_python-1.5.0 → mkdocstrings_python-1.5.2}/tests/test_themes.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mkdocstrings-python
3
- Version: 1.5.0
3
+ Version: 1.5.2
4
4
  Summary: A Python handler for mkdocstrings.
5
5
  Author-Email: Timothée Mazzucotelli <pawamoy@pm.me>
6
6
  License: ISC
@@ -29,7 +29,7 @@ Project-URL: Gitter, https://gitter.im/mkdocstrings/python
29
29
  Project-URL: Funding, https://github.com/sponsors/pawamoy
30
30
  Requires-Python: >=3.8
31
31
  Requires-Dist: mkdocstrings>=0.20
32
- Requires-Dist: griffe>=0.33
32
+ Requires-Dist: griffe>=0.35
33
33
  Description-Content-Type: text/markdown
34
34
 
35
35
  <h1 align="center">mkdocstrings-python</h1>
@@ -33,9 +33,9 @@ classifiers = [
33
33
  ]
34
34
  dependencies = [
35
35
  "mkdocstrings>=0.20",
36
- "griffe>=0.33",
36
+ "griffe>=0.35",
37
37
  ]
38
- version = "1.5.0"
38
+ version = "1.5.2"
39
39
 
40
40
  [project.license]
41
41
  text = "ISC"
@@ -357,11 +357,17 @@ class PythonHandler(BaseHandler):
357
357
  self.env.filters["get_template"] = rendering.do_get_template
358
358
  self.env.tests["existing_template"] = lambda template_name: template_name in self.env.list_templates()
359
359
 
360
- def get_anchors(self, data: CollectorItem) -> set[str]: # noqa: D102 (ignore missing docstring)
360
+ def get_anchors(self, data: CollectorItem) -> tuple[str, ...]: # noqa: D102 (ignore missing docstring)
361
+ anchors = [data.path]
361
362
  try:
362
- return {data.path, data.canonical_path, *data.aliases}
363
+ if data.canonical_path != data.path:
364
+ anchors.append(data.canonical_path)
365
+ for anchor in data.aliases:
366
+ if anchor not in anchors:
367
+ anchors.append(anchor)
363
368
  except AliasResolutionError:
364
- return {data.path}
369
+ return tuple(anchors)
370
+ return tuple(anchors)
365
371
 
366
372
 
367
373
  def get_handler(
@@ -13,6 +13,8 @@
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,11 +25,10 @@
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
- {% filter highlight(language="python", inline=True) %}
29
- {% if show_full_path %}{{ attribute.path }}{% else %}{{ attribute.name }}{% endif %}
30
- {% if attribute.annotation %}: {{ attribute.annotation }}{% endif %}
30
+ {%+ filter highlight(language="python", inline=True) %}
31
+ {{ attribute_name }}{% if attribute.annotation %}: {{ attribute.annotation }}{% endif %}
31
32
  {% if attribute.value %} = {{ attribute.value }}{% endif %}
32
33
  {% endfilter %}
33
34
  {% endif %}
@@ -45,8 +46,7 @@
45
46
  {% if config.separate_signature %}
46
47
  {% filter highlight(language="python", inline=False) %}
47
48
  {% filter format_code(config.line_length) %}
48
- {% if show_full_path %}{{ attribute.path }}{% else %}{{ attribute.name }}{% endif %}
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 %}
@@ -58,7 +58,7 @@
58
58
  {% filter heading(heading_level,
59
59
  role="data" if attribute.parent.kind.value == "module" else "attr",
60
60
  id=html_id,
61
- toc_label=attribute.path if config.show_root_full_path else attribute.name,
61
+ toc_label=attribute.name,
62
62
  hidden=True) %}
63
63
  {% endfilter %}
64
64
  {% endif %}
@@ -31,7 +31,7 @@
31
31
  {% endif %}
32
32
  {% with heading_level = heading_level + extra_level %}
33
33
  {% for attribute in attributes|order_members(config.members_order, members_list) %}
34
- {% if not attribute.is_alias or attribute.is_explicitely_exported or attribute.inherited %}
34
+ {% if members_list is not none or attribute.is_public(check_name=False) %}
35
35
  {% include attribute|get_template with context %}
36
36
  {% endif %}
37
37
  {% endfor %}
@@ -51,7 +51,7 @@
51
51
  {% endif %}
52
52
  {% with heading_level = heading_level + extra_level %}
53
53
  {% for class in classes|order_members(config.members_order, members_list) %}
54
- {% if not class.is_alias or class.is_explicitely_exported or class.inherited %}
54
+ {% if members_list is not none or class.is_public(check_name=False) %}
55
55
  {% include class|get_template with context %}
56
56
  {% endif %}
57
57
  {% endfor %}
@@ -72,7 +72,7 @@
72
72
  {% with heading_level = heading_level + extra_level %}
73
73
  {% for function in functions|order_members(config.members_order, members_list) %}
74
74
  {% if not (obj.kind.value == "class" and function.name == "__init__" and config.merge_init_into_class) %}
75
- {% if not function.is_alias or function.is_explicitely_exported or function.inherited %}
75
+ {% if members_list is not none or function.is_public(check_name=False) %}
76
76
  {% include function|get_template with context %}
77
77
  {% endif %}
78
78
  {% endif %}
@@ -93,8 +93,8 @@
93
93
  {% filter heading(heading_level, id=html_id ~ "-modules") %}Modules{% endfilter %}
94
94
  {% endif %}
95
95
  {% with heading_level = heading_level + extra_level %}
96
- {% for module in modules|order_members(config.members_order, members_list) %}
97
- {% if not module.is_alias or module.is_explicitely_exported or module.inherited %}
96
+ {% for module in modules|order_members(config.members_order.alphabetical, members_list) %}
97
+ {% if members_list is not none or module.is_public(check_name=False) %}
98
98
  {% include module|get_template with context %}
99
99
  {% endif %}
100
100
  {% endfor %}
@@ -119,7 +119,7 @@
119
119
 
120
120
  {% if not (obj.is_class and child.name == "__init__" and config.merge_init_into_class) %}
121
121
 
122
- {% if not child.is_alias or child.is_explicitely_exported or child.inherited %}
122
+ {% if members_list is not none or child.is_public(check_name=False) %}
123
123
  {% if child.is_attribute %}
124
124
  {% with attribute = child %}
125
125
  {% include attribute|get_template with context %}
@@ -13,6 +13,8 @@
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,16 +25,15 @@
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>
27
- {% elif config.merge_init_into_class and "__init__" in class.members -%}
28
- {%- with function = class.members["__init__"] -%}
29
- {%- filter highlight(language="python", inline=True) -%}
30
- {% if show_full_path %}{{ class.path }}{% else %}{{ class.name }}{% endif %}
31
- {%- include "signature.html" with context -%}
32
- {%- endfilter -%}
33
- {%- endwith -%}
28
+ <span class="doc doc-object-name doc-class-name">{{ class_name }}</span>
29
+ {% elif config.merge_init_into_class and "__init__" in class.members %}
30
+ {% with function = class.members["__init__"] %}
31
+ {%+ filter highlight(language="python", inline=True) %}
32
+ {{ class_name }}{% include "signature.html" with context %}
33
+ {% endfilter %}
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
 
@@ -49,7 +50,7 @@
49
50
  {% if "__init__" in class.members %}
50
51
  {% with function = class.members["__init__"] %}
51
52
  {% filter format_signature(function, config.line_length, crossrefs=config.signature_crossrefs) %}
52
- {% if show_full_path %}{{ class.path }}{% else %}{{ class.name }}{% endif %}
53
+ {{ class.name }}
53
54
  {% endfilter %}
54
55
  {% endwith %}
55
56
  {% endif %}
@@ -61,7 +62,7 @@
61
62
  {% filter heading(heading_level,
62
63
  role="class",
63
64
  id=html_id,
64
- toc_label=class.path if config.show_root_full_path else class.name,
65
+ toc_label=class.name,
65
66
  hidden=True) %}
66
67
  {% endfilter %}
67
68
  {% endif %}
@@ -112,11 +113,9 @@
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>
@@ -15,6 +15,8 @@
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,11 +27,10 @@
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
- {% filter highlight(language="python", inline=True) %}
31
- {% if show_full_path %}{{ function.path }}{% else %}{{ function.name }}{% endif %}
32
- {% include "signature.html" with context %}
32
+ {%+ filter highlight(language="python", inline=True) %}
33
+ {{ function_name }}{% include "signature.html" with context %}
33
34
  {% endfilter %}
34
35
  {% endif %}
35
36
  {% endblock heading %}
@@ -45,7 +46,7 @@
45
46
  {% block signature scoped %}
46
47
  {% if config.separate_signature %}
47
48
  {% filter format_signature(function, config.line_length, crossrefs=config.signature_crossrefs) %}
48
- {% if show_full_path %}{{ function.path }}{% else %}{{ function.name }}{% endif %}
49
+ {{ function.name }}
49
50
  {% endfilter %}
50
51
  {% endif %}
51
52
  {% endblock signature %}
@@ -55,7 +56,7 @@
55
56
  {% filter heading(heading_level,
56
57
  role="function",
57
58
  id=html_id,
58
- toc_label=function.path if config.show_root_full_path else function.name,
59
+ toc_label=function.name,
59
60
  hidden=True) %}
60
61
  {% endfilter %}
61
62
  {% endif %}
@@ -13,6 +13,8 @@
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,13 +24,11 @@
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 %}
@@ -44,7 +44,7 @@
44
44
  {% filter heading(heading_level,
45
45
  role="module",
46
46
  id=html_id,
47
- toc_label=module.path if config.show_root_full_path else module.name,
47
+ toc_label=module.name,
48
48
  hidden=True) %}
49
49
  {% endfilter %}
50
50
  {% endif %}
@@ -60,11 +60,9 @@
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>