Skip to content

Commit 14b4c8b

Browse files
committed
Show class prefix in sidebar TOC, plain names in main docs
Change toc_object_entries_show_parents from 'hide' to 'domain' so that the sidebar TOC shows class-prefixed names (e.g., Device.allocate()) while the main documentation shows just the method/attribute names. Also simplified template references from '{{ objname }}.{{ item }}' to just '{{ item }}' since the autoclass context provides the class scope.
1 parent 18fe7df commit 14b4c8b

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

cuda_bindings/docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
# This enables the "On This Page" sidebar to show class methods and properties
5858
# Requires Sphinx 5.1+
5959
toc_object_entries = True
60-
toc_object_entries_show_parents = "hide"
60+
toc_object_entries_show_parents = "domain"
6161

6262
# -- Options for HTML output -------------------------------------------------
6363

cuda_core/docs/source/_templates/autosummary/class.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{% block methods %}
1111
{% if methods %}
1212
{% for item in methods %}
13-
.. automethod:: {{ objname }}.{{ item }}
13+
.. automethod:: {{ item }}
1414

1515
{%- endfor %}
1616
{% endif %}
@@ -19,7 +19,7 @@
1919
{% block attributes %}
2020
{% if attributes %}
2121
{% for item in attributes %}
22-
.. autoproperty:: {{ objname }}.{{ item }}
22+
.. autoproperty:: {{ item }}
2323

2424
{%- endfor %}
2525
{% endif %}

cuda_core/docs/source/_templates/autosummary/cyclass.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{% block methods %}
1111
{% if methods %}
1212
{% for item in methods %}
13-
.. automethod:: {{ objname }}.{{ item }}
13+
.. automethod:: {{ item }}
1414

1515
{%- endfor %}
1616
{% endif %}
@@ -19,7 +19,7 @@
1919
{% block attributes %}
2020
{% if attributes %}
2121
{% for item in attributes %}
22-
.. autoattribute:: {{ objname }}.{{ item }}
22+
.. autoattribute:: {{ item }}
2323

2424
{%- endfor %}
2525
{% endif %}

cuda_core/docs/source/_templates/autosummary/protocol.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{% block methods %}
1111
{% if methods %}
1212
{% for item in methods %}
13-
.. automethod:: {{ objname }}.{{ item }}
13+
.. automethod:: {{ item }}
1414

1515
{%- endfor %}
1616
{% endif %}
@@ -19,7 +19,7 @@
1919
{% block attributes %}
2020
{% if attributes %}
2121
{% for item in attributes %}
22-
.. autoproperty:: {{ objname }}.{{ item }}
22+
.. autoproperty:: {{ item }}
2323

2424
{%- endfor %}
2525
{% endif %}

cuda_core/docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# This enables the "On This Page" sidebar to show class methods and properties
5656
# Requires Sphinx 5.1+
5757
toc_object_entries = True
58-
toc_object_entries_show_parents = "hide"
58+
toc_object_entries_show_parents = "domain"
5959

6060
# -- Options for HTML output -------------------------------------------------
6161

cuda_pathfinder/docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
# This enables the "On This Page" sidebar to show class methods and properties
5959
# Requires Sphinx 5.1+
6060
toc_object_entries = True
61-
toc_object_entries_show_parents = "hide"
61+
toc_object_entries_show_parents = "domain"
6262

6363
# -- Options for HTML output -------------------------------------------------
6464

cuda_python/docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
# This enables the "On This Page" sidebar to show class methods and properties
5252
# Requires Sphinx 5.1+
5353
toc_object_entries = True
54-
toc_object_entries_show_parents = "hide"
54+
toc_object_entries_show_parents = "domain"
5555

5656
# -- Options for HTML output -------------------------------------------------
5757

0 commit comments

Comments
 (0)