mkdocstrings-matlab 0.9.7__py3-none-any.whl → 1.0.0__py3-none-any.whl

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 (45) hide show
  1. mkdocstrings_handlers/matlab/__init__.py +26 -3
  2. mkdocstrings_handlers/matlab/config.py +885 -0
  3. mkdocstrings_handlers/matlab/handler.py +155 -296
  4. mkdocstrings_handlers/matlab/logger.py +111 -0
  5. mkdocstrings_handlers/matlab/rendering.py +818 -0
  6. mkdocstrings_handlers/matlab/templates/material/attributes.html.jinja +25 -0
  7. mkdocstrings_handlers/matlab/templates/material/backlinks.html.jinja +17 -0
  8. mkdocstrings_handlers/matlab/templates/material/children.html.jinja +70 -62
  9. mkdocstrings_handlers/matlab/templates/material/class.html.jinja +236 -0
  10. mkdocstrings_handlers/matlab/templates/material/docstring/admonition.html.jinja +20 -0
  11. mkdocstrings_handlers/matlab/templates/material/docstring/classes.html.jinja +85 -0
  12. mkdocstrings_handlers/matlab/templates/material/docstring/examples.html.jinja +27 -0
  13. mkdocstrings_handlers/matlab/templates/material/docstring/functions.html.jinja +91 -0
  14. mkdocstrings_handlers/matlab/templates/material/docstring/input_arguments.html.jinja +171 -0
  15. mkdocstrings_handlers/matlab/templates/material/docstring/name_value_arguments.html.jinja +166 -0
  16. mkdocstrings_handlers/matlab/templates/material/docstring/namespaces.html.jinja +5 -6
  17. mkdocstrings_handlers/matlab/templates/material/docstring/output_arguments.html.jinja +152 -0
  18. mkdocstrings_handlers/matlab/templates/material/docstring/properties.html.jinja +25 -26
  19. mkdocstrings_handlers/matlab/templates/material/docstring.html.jinja +53 -0
  20. mkdocstrings_handlers/matlab/templates/material/expression.html.jinja +55 -0
  21. mkdocstrings_handlers/matlab/templates/material/folder.html.jinja +31 -39
  22. mkdocstrings_handlers/matlab/templates/material/function.html.jinja +148 -0
  23. mkdocstrings_handlers/matlab/templates/material/language.html.jinja +18 -0
  24. mkdocstrings_handlers/matlab/templates/material/languages/en.html.jinja +38 -0
  25. mkdocstrings_handlers/matlab/templates/material/languages/ja.html.jinja +38 -0
  26. mkdocstrings_handlers/matlab/templates/material/languages/zh.html.jinja +38 -0
  27. mkdocstrings_handlers/matlab/templates/material/namespace.html.jinja +32 -38
  28. mkdocstrings_handlers/matlab/templates/material/property.html.jinja +39 -35
  29. mkdocstrings_handlers/matlab/templates/material/script.html.jinja +3 -25
  30. mkdocstrings_handlers/matlab/templates/material/signature.html.jinja +105 -0
  31. mkdocstrings_handlers/matlab/templates/material/style.css +179 -4
  32. mkdocstrings_handlers/matlab/templates/material/summary/classes.html.jinja +25 -0
  33. mkdocstrings_handlers/matlab/templates/material/summary/functions.html.jinja +25 -0
  34. mkdocstrings_handlers/matlab/templates/material/summary/namespaces.html.jinja +17 -13
  35. mkdocstrings_handlers/matlab/templates/material/summary/properties.html.jinja +17 -13
  36. mkdocstrings_handlers/matlab/templates/material/summary.html.jinja +6 -6
  37. {mkdocstrings_matlab-0.9.7.dist-info → mkdocstrings_matlab-1.0.0.dist-info}/METADATA +17 -19
  38. mkdocstrings_matlab-1.0.0.dist-info/RECORD +41 -0
  39. mkdocstrings_handlers/matlab/collect.py +0 -783
  40. mkdocstrings_handlers/matlab/enums.py +0 -54
  41. mkdocstrings_handlers/matlab/models.py +0 -633
  42. mkdocstrings_handlers/matlab/treesitter.py +0 -707
  43. mkdocstrings_matlab-0.9.7.dist-info/RECORD +0 -22
  44. {mkdocstrings_matlab-0.9.7.dist-info → mkdocstrings_matlab-1.0.0.dist-info}/WHEEL +0 -0
  45. {mkdocstrings_matlab-0.9.7.dist-info → mkdocstrings_matlab-1.0.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,9 +1,9 @@
1
- {#- Template for Python modules.
1
+ {#- Template for MATLAB namespaces
2
2
 
3
- This template renders a Python module.
3
+ This template renders a MATALB namespace.
4
4
 
5
5
  Context:
6
- module (griffe.Module): The module to render.
6
+ namespace (griffe.namespace): The namespace to render.
7
7
  root (bool): Whether this is the root object, injected with `:::` in a Markdown page.
8
8
  heading_level (int): The HTML heading level to use.
9
9
  config (dict): The configuration options.
@@ -11,14 +11,14 @@ Context:
11
11
 
12
12
  {% block logs scoped %}
13
13
  {#- Logging block.
14
-
14
+
15
15
  This block can be used to log debug messages, deprecation messages, warnings, etc.
16
16
  -#}
17
- {{ log.debug("Rendering " + module.path) }}
17
+ {{ log.debug("Rendering " + namespace.path) }}
18
18
  {% endblock logs %}
19
19
 
20
- <div class="doc doc-object doc-module">
21
- {% with obj = module, html_id = module.path %}
20
+ <div class="doc doc-object doc-namespace">
21
+ {% with obj = namespace, html_id = "+" + namespace.path %}
22
22
 
23
23
  {% if root %}
24
24
  {% set show_full_path = config.show_root_full_path %}
@@ -27,51 +27,41 @@ Context:
27
27
  {% set show_full_path = config.show_root_members_full_path or config.show_object_full_path %}
28
28
  {% set root_members = False %}
29
29
  {% else %}
30
- {% set show_full_path = config.show_object_full_path %}
30
+ {% set show_full_path = config.show_object_full_path %}"|get_template
31
31
  {% endif %}
32
32
 
33
- {% set module_name = module.path + ".*" if show_full_path else module.name + ".*" %}
33
+ {% set namespace_name = namespace.path + ".*" if show_full_path else namespace.name + ".*" %}
34
34
 
35
35
  {% if not root or config.show_root_heading %}
36
36
  {% filter heading(
37
37
  heading_level,
38
- role="module",
38
+ role="namespace",
39
39
  id=html_id,
40
40
  class="doc doc-heading",
41
- toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-namespace"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + module.name,
41
+ toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-namespace"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + (config.toc_label if config.toc_label and root else namespace.name),
42
42
  ) %}
43
43
 
44
44
  {% block heading scoped %}
45
45
  {#- Heading block.
46
-
47
- This block renders the heading for the module.
46
+
47
+ This block renders the heading for the namespace.
48
48
  -#}
49
49
  {% if config.show_symbol_type_heading %}<code class="doc-symbol doc-symbol-heading doc-symbol-namespace"></code>{% endif %}
50
50
  {% if config.separate_signature %}
51
- <span class="doc doc-object-name doc-module-name">{{ module_name }}</span>
51
+ <span class="doc doc-object-name doc-namespace-name">{{ config.heading if config.heading and root else namespace_name }}</span>
52
52
  {% else %}
53
- <code>{{ module_name }}</code>
53
+ <code>{{ namespace_name }}</code>
54
54
  {% endif %}
55
55
  {% endblock heading %}
56
56
 
57
- {% block labels scoped %}
58
- {#- Labels block.
59
-
60
- This block renders the labels for the module.
61
- -#}
62
- {% with labels = module.labels %}
63
- {% include "labels"|get_template with context %}
64
- {% endwith %}
65
- {% endblock labels %}
66
-
67
57
  {% endfilter %}
68
58
 
69
59
  {% else %}
70
60
  {% if config.show_root_toc_entry %}
71
61
  {% filter heading(heading_level,
72
- role="module",
62
+ role="namespace",
73
63
  id=html_id,
74
- toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-namespace"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + module.name,
64
+ toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-namespace"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + (config.toc_label if config.toc_label and root else namespace.name),
75
65
  hidden=True,
76
66
  ) %}
77
67
  {% endfilter %}
@@ -82,37 +72,41 @@ Context:
82
72
  <div class="doc doc-contents {% if root %}first{% endif %}">
83
73
  {% block contents scoped %}
84
74
  {#- Contents block.
85
-
86
- This block renders the contents of the module.
75
+
76
+ This block renders the contents of the namespace.
87
77
  It contains other blocks that users can override.
88
78
  Overriding the contents block allows to rearrange the order of the blocks.
89
79
  -#}
90
80
  {% block docstring scoped %}
91
81
  {#- Docstring block.
92
-
93
- This block renders the docstring for the module.
82
+
83
+ This block renders the docstring for the namespace.
94
84
  -#}
95
- {% with docstring_sections = module.docstring.parsed %}
96
- {% include "docstring"|get_template with context %}
85
+ {% with docstring_sections = namespace.docstring.parsed %}
86
+ {% include "docstring.html.jinja" with context %}
97
87
  {% endwith %}
98
88
  {% endblock docstring %}
99
89
 
90
+ {% if config.backlinks %}
91
+ <backlinks identifier="{{ html_id }}" handler="python" />
92
+ {% endif %}
93
+
100
94
  {% block summary scoped %}
101
95
  {#- Summary block.
102
-
96
+
103
97
  This block renders auto-summaries for classes, methods, and attributes.
104
98
  -#}
105
- {% include "summary"|get_template with context %}
99
+ {% include "summary.html.jinja" with context %}
106
100
  {% endblock summary %}
107
101
 
108
102
  {% block children scoped %}
109
103
  {#- Children block.
110
-
111
- This block renders the children (members) of the module.
104
+
105
+ This block renders the children (members) of the namespace.
112
106
  -#}
113
107
  {% set root = False %}
114
108
  {% set heading_level = heading_level + 1 %}
115
- {% include "children"|get_template with context %}
109
+ {% include "children.html.jinja" with context %}
116
110
  {% endblock children %}
117
111
  {% endblock contents %}
118
112
  </div>
@@ -1,25 +1,25 @@
1
- {#- Template for Python attributes.
1
+ {#- Template for MATLAB properties.
2
2
 
3
- This template renders a Python attribute (or variable).
4
- This can be a module attribute or a class attribute.
3
+ This template renders a MATLAB class property.
5
4
 
6
5
  Context:
7
- attribute (griffe.Attribute): The attribute to render.
6
+ property (mkdocstrings_handlers.matlab.models.Property): The property to render.
8
7
  root (bool): Whether this is the root object, injected with `:::` in a Markdown page.
9
8
  heading_level (int): The HTML heading level to use.
10
9
  config (dict): The configuration options.
11
10
  -#}
12
11
 
12
+
13
13
  {% block logs scoped %}
14
14
  {#- Logging block.
15
-
15
+
16
16
  This block can be used to log debug messages, deprecation messages, warnings, etc.
17
17
  -#}
18
- {{ log.debug("Rendering " + attribute.path) }}
18
+ {{ log.debug("Rendering " + property.path) }}
19
19
  {% endblock logs %}
20
20
 
21
- <div class="doc doc-object doc-attribute">
22
- {% with obj = attribute, html_id = attribute.path %}
21
+ <div class="doc doc-object doc-property">
22
+ {% with obj = property, html_id = property.path %}
23
23
 
24
24
  {% if root %}
25
25
  {% set show_full_path = config.show_root_full_path %}
@@ -31,53 +31,53 @@ Context:
31
31
  {% set show_full_path = config.show_object_full_path %}
32
32
  {% endif %}
33
33
 
34
- {% set attribute_name = attribute.path if show_full_path else attribute.name %}
34
+ {% set property_name = property.path if show_full_path else property.name %}
35
35
 
36
36
  {% if not root or config.show_root_heading %}
37
37
  {% filter heading(
38
38
  heading_level,
39
- role="data" if attribute.parent.kind.value == "module" else "attr",
39
+ role="data" if property.parent.kind.value == "module" else "attr",
40
40
  id=html_id,
41
41
  class="doc doc-heading",
42
- toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-property"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + attribute.name,
42
+ toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-property"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + (config.toc_label if config.toc_label and root else property_name),
43
43
  ) %}
44
44
 
45
45
  {% block heading scoped %}
46
46
  {#- Heading block.
47
-
48
- This block renders the heading for the attribute.
47
+
48
+ This block renders the heading for the property.
49
49
  -#}
50
50
  {% if config.show_symbol_type_heading %}<code class="doc-symbol doc-symbol-heading doc-symbol-property"></code>{% endif %}
51
51
  {% if config.separate_signature %}
52
- <span class="doc doc-object-name doc-attribute-name">{{ attribute_name }}</span>
52
+ <span class="doc doc-object-name doc-property-name">{{ config.heading if config.heading and root else property_name }}</span>
53
53
  {% else %}
54
54
  {%+ filter highlight(language="python", inline=True) %}
55
- {{ attribute_name }}{% if attribute.annotation and config.show_signature_annotations %}: {{ attribute.annotation }}{% endif %}
56
- {% if attribute.value %} = {{ attribute.value }}{% endif %}
55
+ {{ property_name }}{% if property.annotation and config.show_signature_types %}: {{ property.annotation }}{% endif %}
56
+ {% if property.value %} = {{ property.value }}{% endif %}
57
57
  {% endfilter %}
58
58
  {% endif %}
59
59
  {% endblock heading %}
60
60
 
61
- {% block labels scoped %}
62
- {#- Labels block.
63
-
64
- This block renders the labels for the attribute.
61
+ {% block attributes scoped %}
62
+ {#- attributes block.
63
+
64
+ This block renders the attributes for the property.
65
65
  -#}
66
- {% with labels = attribute.labels %}
67
- {% include "labels"|get_template with context %}
66
+ {% with attributes = property.attributes %}
67
+ {% include "attributes.html.jinja" with context %}
68
68
  {% endwith %}
69
- {% endblock labels %}
69
+ {% endblock attributes %}
70
70
 
71
71
  {% endfilter %}
72
72
 
73
73
  {% block signature scoped %}
74
74
  {#- Signature block.
75
-
76
- This block renders the signature for the attribute.
75
+
76
+ This block renders the signature for the property.
77
77
  -#}
78
78
  {% if config.separate_signature %}
79
- {% filter format_attribute(attribute, config.line_length, crossrefs=config.signature_crossrefs) %}
80
- {{ attribute.name }}
79
+ {% filter format_property(property, config.line_length, crossrefs=config.signature_crossrefs) %}
80
+ {{ property.name }}
81
81
  {% endfilter %}
82
82
  {% endif %}
83
83
  {% endblock signature %}
@@ -86,9 +86,9 @@ Context:
86
86
 
87
87
  {% if config.show_root_toc_entry %}
88
88
  {% filter heading(heading_level,
89
- role="data" if attribute.parent.kind.value == "module" else "attr",
89
+ role="data" if property.parent.kind.value == "module" else "attr",
90
90
  id=html_id,
91
- toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-property"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + attribute.name,
91
+ toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-property"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + (config.toc_label if config.toc_label and root else property_name),
92
92
  hidden=True,
93
93
  ) %}
94
94
  {% endfilter %}
@@ -99,20 +99,24 @@ Context:
99
99
  <div class="doc doc-contents {% if root %}first{% endif %}">
100
100
  {% block contents scoped %}
101
101
  {#- Contents block.
102
-
103
- This block renders the contents of the attribute.
102
+
103
+ This block renders the contents of the property.
104
104
  It contains other blocks that users can override.
105
105
  Overriding the contents block allows to rearrange the order of the blocks.
106
106
  -#}
107
107
  {% block docstring scoped %}
108
108
  {#- Docstring block.
109
-
110
- This block renders the docstring for the attribute.
109
+
110
+ This block renders the docstring for the property.
111
111
  -#}
112
- {% with docstring_sections = attribute.docstring.parsed %}
113
- {% include "docstring"|get_template with context %}
112
+ {% with docstring_sections = property.docstring.parsed %}
113
+ {% include "docstring.html.jinja" with context %}
114
114
  {% endwith %}
115
115
  {% endblock docstring %}
116
+
117
+ {% if config.backlinks %}
118
+ <backlinks identifier="{{ html_id }}" handler="python" />
119
+ {% endif %}
116
120
  {% endblock contents %}
117
121
  </div>
118
122
 
@@ -17,7 +17,7 @@ Context:
17
17
  {{ log.debug("Rendering " + script.path) }}
18
18
  {% endblock logs %}
19
19
 
20
- <div class="doc doc-object doc-function">
20
+ <div class="doc doc-object doc-script">
21
21
  {% with obj = script, html_id = script.path %}
22
22
 
23
23
  {% if root %}
@@ -56,30 +56,8 @@ Context:
56
56
  {% endif %}
57
57
  {% endblock heading %}
58
58
 
59
- {% block labels scoped %}
60
- {#- Labels block.
61
-
62
- This block renders the labels for the script.
63
- -#}
64
- {% with labels = script.labels %}
65
- {% include "labels"|get_template with context %}
66
- {% endwith %}
67
- {% endblock labels %}
68
-
69
59
  {% endfilter %}
70
60
 
71
- {% block signature scoped %}
72
- {#- Signature block.
73
-
74
- This block renders the signature for the script.
75
- -#}
76
- {% if config.separate_signature %}
77
- {% filter format_signature(script, config.line_length, crossrefs=config.signature_crossrefs) %}
78
- {{ script.name }}
79
- {% endfilter %}
80
- {% endif %}
81
- {% endblock signature %}
82
-
83
61
  {% else %}
84
62
 
85
63
  {% if config.show_root_toc_entry %}
@@ -108,7 +86,7 @@ Context:
108
86
  This block renders the docstring for the script.
109
87
  -#}
110
88
  {% with docstring_sections = script.docstring.parsed %}
111
- {% include "docstring"|get_template with context %}
89
+ {% include "docstring.html.jinja" with context %}
112
90
  {% endwith %}
113
91
  {% endblock docstring %}
114
92
 
@@ -126,7 +104,7 @@ Context:
126
104
  {{ script.relative_filepath }}
127
105
  {%- endif -%}
128
106
  </code></summary>
129
- {{ script.source|highlight(language="python", linestart=script.lineno or 0, linenums=True) }}
107
+ {{ script.source|highlight(language="matlab", linestart=script.lineno or 0, linenums=True) }}
130
108
  </details>
131
109
  {% endif %}
132
110
  {% endblock source %}
@@ -0,0 +1,105 @@
1
+ {#- Template for signatures.
2
+
3
+ This template renders the signature of a function or method.
4
+ It iterates over the arguments of the function to rebuild the signature.
5
+ The signature is the list of arguments of a function or method, including their names, default values, and types.
6
+
7
+ Context:
8
+ function (mkdocstrings_handlers.matlab.models.Function): The function or method to render.
9
+ config (dict): The configuration options.
10
+ -#}
11
+
12
+ {%- if config.show_signature -%}
13
+ {%- block logs scoped -%}
14
+ {#- Logging block.
15
+
16
+ This block can be used to log debug messages, deprecation messages, warnings, etc.
17
+ -#}
18
+ {{ log.debug("Rendering signature") }}
19
+ {%- endblock logs -%}
20
+ {%- with -%}
21
+
22
+ {%- set ns = jinja_namespace(
23
+ type="",
24
+ equal="=",
25
+ default=False,
26
+ ) -%}
27
+
28
+ (
29
+ {%- for argument in function.arguments -%}
30
+ {%- if argument.name != "obj" or loop.index0 > 0 or not (function.parent and function.parent.is_class) -%}
31
+
32
+ {#- Prepare types. -#}
33
+ {%- if config.show_signature_types and argument.type is not none -%}
34
+ {%- set ns.equal = " = " -%}
35
+ {%- if config.separate_signature -%}
36
+ {%- with expression = argument.type -%}
37
+ {%- set ns.type -%}: {% with backlink_type = "used-by" -%}
38
+ {%- include "expression.html.jinja" with context -%}
39
+ {%- endwith -%}{%- endset -%}
40
+ {%- endwith -%}
41
+ {%- else -%}
42
+ {%- set ns.type = ": " + argument.type|safe -%}
43
+ {%- endif -%}
44
+ {%- else -%}
45
+ {%- set ns.equal = "=" -%}
46
+ {%- set ns.type = "" -%}
47
+ {%- endif -%}
48
+
49
+ {#- Prepare default value. -#}
50
+ {%- if argument.default is not none and argument.kind.value != "varargin" -%}
51
+ {%- set ns.default = True -%}
52
+ {%- else -%}
53
+ {%- set ns.default = False -%}
54
+ {%- endif -%}
55
+
56
+ {#- Render argument name with optional cross-reference to its heading. -#}
57
+ {%- if config.separate_signature and config.argument_headings and config.signature_crossrefs -%}
58
+ {%- filter stash_crossref(length=argument.name|length) -%}
59
+ {%- with func_path = function.path -%}
60
+ {%- if config.merge_constructor_into_class and function.parent and function.parent.is_class and function.name == function.parent.name -%}
61
+ {%- set func_path = func_path[:-((function.parent | length) + 1)] -%}
62
+ {%- endif -%}
63
+ <autoref identifier="{{ func_path }}({{ argument.name }})" optional>{{ argument.name }}</autoref>
64
+ {%- endwith -%}
65
+ {%- endfilter -%}
66
+ {%- else -%}
67
+ {{ argument.name }}
68
+ {%- endif -%}
69
+
70
+ {#- Render argument type. -#}
71
+ {{ ns.type }}
72
+
73
+ {#- Render argument default value. -#}
74
+ {%- if ns.default -%}
75
+ {{ ns.equal }}
76
+ {%- if config.signature_crossrefs and config.separate_signature -%}
77
+ {%- with expression = argument.default, backlink_type = "used-by" -%}
78
+ {%- include "expression.html.jinja" with context -%}
79
+ {%- endwith -%}
80
+ {%- else -%}
81
+ {{ argument.default|safe }}
82
+ {%- endif -%}
83
+ {%- endif -%}
84
+
85
+ {%- if not loop.last %}, {% endif -%}
86
+
87
+ {%- endif -%}
88
+ {%- endfor -%}
89
+ )
90
+
91
+ {#- Render return type. -#}
92
+ {%- if config.show_signature_types
93
+ and function.type
94
+ and not (config.merge_constructor_into_class and function.parent and function.parent.is_class and function.name == function.parent.name)
95
+ %} -> {% if config.separate_signature and config.signature_crossrefs -%}
96
+ {%- with expression = function.type, backlink_type = "returned-by" -%}
97
+ {%- include "expression.html.jinja" with context -%}
98
+ {%- endwith -%}
99
+ {%- else -%}
100
+ {{ function.type|safe }}
101
+ {%- endif -%}
102
+ {%- endif -%}
103
+
104
+ {%- endwith -%}
105
+ {%- endif -%}
@@ -1,3 +1,173 @@
1
+ /* Avoid breaking argument names, etc. in table cells. */
2
+ .doc-contents td code {
3
+ word-break: normal !important;
4
+ }
5
+
6
+ /* No line break before first paragraph of descriptions. */
7
+ .doc-md-description,
8
+ .doc-md-description>p:first-child {
9
+ display: inline;
10
+ }
11
+
12
+ /* Max width for docstring sections tables. */
13
+ .doc .md-typeset__table,
14
+ .doc .md-typeset__table table {
15
+ display: table !important;
16
+ width: 100%;
17
+ }
18
+
19
+ .doc .md-typeset__table tr {
20
+ display: table-row;
21
+ }
22
+
23
+ /* Defaults in Spacy table style. */
24
+ .doc-argument-default {
25
+ float: right;
26
+ }
27
+
28
+ /* Argument headings must be inline, not blocks. */
29
+ .doc-heading-argument {
30
+ display: inline;
31
+ }
32
+
33
+ /* Prefer space on the right, not the left of argument permalinks. */
34
+ .doc-heading-argument .headerlink {
35
+ margin-left: 0 !important;
36
+ margin-right: 0.2rem;
37
+ }
38
+
39
+ /* Backward-compatibility: docstring section titles in bold. */
40
+ .doc-section-title {
41
+ font-weight: bold;
42
+ }
43
+
44
+ /* Backlinks crumb separator. */
45
+ .doc-backlink-crumb {
46
+ display: inline-flex;
47
+ gap: .2rem;
48
+ white-space: nowrap;
49
+ align-items: center;
50
+ vertical-align: middle;
51
+ }
52
+ .doc-backlink-crumb:not(:first-child)::before {
53
+ background-color: var(--md-default-fg-color--lighter);
54
+ content: "";
55
+ display: inline;
56
+ height: 1rem;
57
+ --md-path-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6z"/></svg>');
58
+ -webkit-mask-image: var(--md-path-icon);
59
+ mask-image: var(--md-path-icon);
60
+ width: 1rem;
61
+ }
62
+ .doc-backlink-crumb.last {
63
+ font-weight: bold;
64
+ }
65
+
66
+ /* Symbols in Navigation and ToC. */
67
+ :root, :host,
68
+ [data-md-color-scheme="default"] {
69
+ --doc-symbol-argument-fg-color: #df50af;
70
+ --doc-symbol-property-fg-color: #953800;
71
+ --doc-symbol-script-fg-color: #d0bf3d;
72
+ --doc-symbol-function-fg-color: #8250df;
73
+ --doc-symbol-method-fg-color: #8250df;
74
+ --doc-symbol-class-fg-color: #0550ae;
75
+ --doc-symbol-module-fg-color: #5cad0f;
76
+
77
+ --doc-symbol-argument-bg-color: #df50af1a;
78
+ --doc-symbol-property-bg-color: #9538001a;
79
+ --doc-symbol-script-bg-color: #96862f27;
80
+ --doc-symbol-function-bg-color: #8250df1a;
81
+ --doc-symbol-method-bg-color: #8250df1a;
82
+ --doc-symbol-class-bg-color: #0550ae1a;
83
+ --doc-symbol-module-bg-color: #5cad0f1a;
84
+ }
85
+
86
+ [data-md-color-scheme="slate"] {
87
+ --doc-symbol-argument-fg-color: #ffa8cc;
88
+ --doc-symbol-property-fg-color: #ffa657;
89
+ --doc-symbol-script-fg-color: #f0d78a;
90
+ --doc-symbol-function-fg-color: #d2a8ff;
91
+ --doc-symbol-method-fg-color: #d2a8ff;
92
+ --doc-symbol-class-fg-color: #79c0ff;
93
+ --doc-symbol-module-fg-color: #baff79;
94
+
95
+ --doc-symbol-argument-bg-color: #ffa8cc1a;
96
+ --doc-symbol-property-bg-color: #ffa6571a;
97
+ --doc-symbol-script-bg-color: #f0d78a1a;
98
+ --doc-symbol-function-bg-color: #d2a8ff1a;
99
+ --doc-symbol-method-bg-color: #d2a8ff1a;
100
+ --doc-symbol-class-bg-color: #79c0ff1a;
101
+ --doc-symbol-module-bg-color: #baff791a;
102
+ }
103
+
104
+ code.doc-symbol {
105
+ border-radius: .1rem;
106
+ font-size: .85em;
107
+ padding: 0 .3em;
108
+ font-weight: bold;
109
+ }
110
+
111
+ code.doc-symbol-argument,
112
+ a code.doc-symbol-argument {
113
+ color: var(--doc-symbol-argument-fg-color);
114
+ background-color: var(--doc-symbol-argument-bg-color);
115
+ }
116
+
117
+ code.doc-symbol-argument::after {
118
+ content: "arg";
119
+ }
120
+
121
+ code.doc-symbol-property,
122
+ a code.doc-symbol-property {
123
+ color: var(--doc-symbol-property-fg-color);
124
+ background-color: var(--doc-symbol-property-bg-color);
125
+ }
126
+
127
+ code.doc-symbol-property::after {
128
+ content: "prop";
129
+ }
130
+
131
+ code.doc-symbol-function,
132
+ a code.doc-symbol-function {
133
+ color: var(--doc-symbol-function-fg-color);
134
+ background-color: var(--doc-symbol-function-bg-color);
135
+ }
136
+
137
+ code.doc-symbol-function::after {
138
+ content: "func";
139
+ }
140
+
141
+ code.doc-symbol-method,
142
+ a code.doc-symbol-method {
143
+ color: var(--doc-symbol-method-fg-color);
144
+ background-color: var(--doc-symbol-method-bg-color);
145
+ }
146
+
147
+ code.doc-symbol-method::after {
148
+ content: "meth";
149
+ }
150
+
151
+ code.doc-symbol-class,
152
+ a code.doc-symbol-class {
153
+ color: var(--doc-symbol-class-fg-color);
154
+ background-color: var(--doc-symbol-class-bg-color);
155
+ }
156
+
157
+ code.doc-symbol-class::after {
158
+ content: "class";
159
+ }
160
+
161
+ code.doc-symbol-module,
162
+ a code.doc-symbol-module {
163
+ color: var(--doc-symbol-module-fg-color);
164
+ background-color: var(--doc-symbol-module-bg-color);
165
+ }
166
+
167
+ code.doc-symbol-module::after {
168
+ content: "mod";
169
+ }
170
+
1
171
  code.doc-symbol-namespace {
2
172
  color: var(--doc-symbol-module-fg-color);
3
173
  background-color: var(--doc-symbol-module-bg-color);
@@ -17,8 +187,8 @@ code.doc-symbol-folder::after {
17
187
  }
18
188
 
19
189
  code.doc-symbol-property {
20
- color: var(--doc-symbol-attribute-fg-color);
21
- background-color: var(--doc-symbol-attribute-bg-color);
190
+ color: var(--doc-symbol-property-fg-color);
191
+ background-color: var(--doc-symbol-property-bg-color);
22
192
  }
23
193
 
24
194
  code.doc-symbol-property::after {
@@ -26,10 +196,15 @@ code.doc-symbol-property::after {
26
196
  }
27
197
 
28
198
  code.doc-symbol-script {
29
- color: #d0bf3d;
30
- background-color: #96862f27;
199
+ color: var(--doc-symbol-script-fg-color);
200
+ background-color: var(--doc-symbol-script-bg-color);
31
201
  }
32
202
 
33
203
  code.doc-symbol-script::after {
34
204
  content: "script";
35
205
  }
206
+
207
+ .doc-signature .autorefs {
208
+ color: inherit;
209
+ border-bottom: 1px dotted currentcolor;
210
+ }
@@ -0,0 +1,25 @@
1
+ {#- Summary of classes. -#}
2
+
3
+ {% block logs scoped %}
4
+ {#- Logging block.
5
+
6
+ This block can be used to log debug messages, deprecation messages, warnings, etc.
7
+ -#}
8
+ {% endblock logs %}
9
+
10
+ {% if not obj.docstring.parsed | selectattr("kind.value", "eq", "classes") | list %}
11
+ {% with section = obj.classes
12
+ |filter_objects(
13
+ filters=config.filters,
14
+ members_list=members_list,
15
+ inherited_members=config.inherited_members,
16
+ private_members=config.private_members,
17
+ hidden_members=config.hidden_members,
18
+ keep_no_docstrings=config.show_if_no_docstring,
19
+ )
20
+ |order_members(config.members_order, members_list)
21
+ |as_classes_section(check_public=not members_list)
22
+ %}
23
+ {% if section %}{% include "docstring/classes.html.jinja" with context %}{% endif %}
24
+ {% endwith %}
25
+ {% endif %}