doc: have tighter control on what autodoc shows
New versions of sphinx starting showing `__init__` parameters even when we don't want them to show because they are private (have `_ispytest` argument). The only working solution I found was to switch to `autodoc_typehints_description_target = "documented"` and explicitly document parameters for which we want to show the types. It's a little tedious and repetitive in some simple cases, but overall it results in nicer API docs.
This commit is contained in:
@@ -38,6 +38,7 @@ release = ".".join(version.split(".")[:2])
|
||||
|
||||
autodoc_member_order = "bysource"
|
||||
autodoc_typehints = "description"
|
||||
autodoc_typehints_description_target = "documented"
|
||||
todo_include_todos = 1
|
||||
|
||||
latex_engine = "lualatex"
|
||||
|
||||
@@ -102,7 +102,7 @@ pytest.deprecated_call
|
||||
|
||||
**Tutorial**: :ref:`ensuring_function_triggers`
|
||||
|
||||
.. autofunction:: pytest.deprecated_call()
|
||||
.. autofunction:: pytest.deprecated_call([match])
|
||||
:with:
|
||||
|
||||
pytest.register_assert_rewrite
|
||||
|
||||
Reference in New Issue
Block a user