Skip to content

Commit

Permalink
Always show type hints in docs (#31)
Browse files Browse the repository at this point in the history
Before, we would only show type hints for parameters that had dedicated docstring. There are a lot of parameters that don't have docstring—and sometimes don't need it because it's obvious—so it's best to no matter what show the docstring.

This PR aligns the autodoc templates and config with the other addons like cutting.
  • Loading branch information
Eric-Arellano authored Nov 7, 2024
1 parent 944626e commit a46b3d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions docs/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
.. autoclass:: {{ objname }}
:no-members:
:no-inherited-members:
:no-special-members:
:show-inheritance:

{% block attributes_summary %}
Expand Down
5 changes: 0 additions & 5 deletions docs/_templates/autosummary/function.rst

This file was deleted.

6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@
.. |version| replace:: {release}
"""

# Options for autodoc. These reflect the values from Terra.
# Options for autodoc. These reflect the values from Qiskit SDK and Runtime.
autosummary_generate = True
autosummary_generate_overwrite = False
autoclass_content = "both"
autodoc_typehints = "description"
autodoc_typehints_description_target = "documented_params"
autodoc_member_order = "bysource"
autodoc_default_options = {
"inherited-members": None,
}
napoleon_google_docstring = True
napoleon_numpy_docstring = False


# This adds numbers to the captions for figures, tables,
Expand Down

0 comments on commit a46b3d1

Please sign in to comment.