Skip to content

Commit 5e1fdd5

Browse files
committed
feat!: Remove sphinx_toctree_autodoc_fix (Superseded by sphinx 5.2+)
- sphinx-doc/sphinx#6316 - sphinx-doc/sphinx#10807 - https://gist.github.com/agoose77/e8f0f8f7d7133e73483ca5c2dd7b907f
1 parent d8ff8cd commit 5e1fdd5

File tree

5 files changed

+16
-123
lines changed

5 files changed

+16
-123
lines changed

README.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -134,21 +134,23 @@ See more: <https://gp-libs.git-pull.com/linkify_issues/>
134134

135135
### Table of contents for autodoc
136136

137-
`sphinx.ext.autodoc` doesn't link objects in the table of contents. So we need a
138-
plugin to help.
137+
Removed in v0.0.1a12.
139138

140-
See more: <https://gp-libs.git-pull.com/sphinx_toctree_autodoc_fix/>
139+
[Sphinx 5.2](https://pypi.org/project/Sphinx/5.2.0) bakes this in by default:
141140

142-
#### Configuration
141+
Settings options:
143142

144-
1. Add `'sphinx_toctree_autodoc_fix'` to `extensions`
143+
- `add_function_parentheses = False` (default: `True`)
144+
- `toc_object_entries_show_parents` can be (default: `'domain'`):
145+
- `toc_object_entries_show_parents = 'domain'`
146+
- `toc_object_entries_show_parents = 'hide'`
147+
- `toc_object_entries_show_parents = 'all'`
145148

146-
```python
147-
extensions = [
148-
# ...
149-
"sphinx_toctree_autodoc_fix",
150-
]
151-
```
149+
See also:
150+
151+
- https://github.com/sphinx-doc/sphinx/issues/6316
152+
- https://github.com/sphinx-doc/sphinx/pull/10807
153+
- https://gist.github.com/agoose77/e8f0f8f7d7133e73483ca5c2dd7b907f
152154

153155
## Install
154156

docs/conf.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"sphinxext.rediraffe",
3636
"myst_parser",
3737
"linkify_issues",
38-
"sphinx_toctree_autodoc_fix",
3938
]
4039
myst_enable_extensions = [
4140
"colon_fence",
@@ -94,6 +93,9 @@
9493
]
9594
}
9695

96+
# sphinx.ext.autoapi
97+
toc_object_entries_show_parents = "hide"
98+
9799
# linkify_issues
98100
issue_url_tpl = f'{about["__github__"]}/issues/{{issue_id}}'
99101

docs/index.md

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
1010
quickstart
1111
doctest/index
12-
sphinx_toctree_autodoc_fix/index
1312
linkify_issues/index
1413
```
1514

docs/sphinx_toctree_autodoc_fix/index.md

-31
This file was deleted.

tests/test_sphinx_toctree_autodoc_fix.py

-79
This file was deleted.

0 commit comments

Comments
 (0)