Skip to content

Commit f707efd

Browse files
committed
Change: Use sphinx directly for typehints in API docs
Drop using the external plugin for typehints. This isn't necessary anymore because sphinx comes with support for typehints nowadays.
1 parent 4a0f170 commit f707efd

File tree

3 files changed

+13
-29
lines changed

3 files changed

+13
-29
lines changed

docs/conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"sphinx.ext.autodoc",
4848
"sphinx.ext.githubpages",
4949
"sphinx.ext.napoleon",
50-
"sphinx_autodoc_typehints",
5150
]
5251

5352
# Add any paths that contain templates here, relative to this directory.
@@ -123,6 +122,11 @@
123122

124123
html_show_sourcelink = False
125124

125+
autodoc_typehints = "description"
126+
autodoc_typehints_description_target = "documented"
127+
128+
autodoc_class_signature = "separated"
129+
126130

127131
# -- Options for HTMLHelp output ---------------------------------------------
128132

poetry.lock

Lines changed: 8 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ defusedxml = ">=0.6,<0.8"
4141
coverage = "^6.4"
4242
pylint = "^2.13"
4343
sphinx = "^5.1.1"
44-
sphinx-autodoc-typehints = "^1.19.1"
4544
autohooks = ">=22.7.2"
4645
autohooks-plugin-pylint = ">=21.6.0"
4746
autohooks-plugin-black = ">=22.7.0"

0 commit comments

Comments
 (0)