Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes display of inherited members of classes #404

Merged
merged 2 commits into from
Apr 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
.. autoclass:: {{ objname }}
:members:
:show-inheritance:
{% if objname != "progress" %}
:inherited-members:
{% endif %}
{#- These classes inherit docstrings from the raw qt source, which generates rst syntax errors when building the docs #}
{% if objname not in ["progress", "cancelable_progress"] -%}
:inherited-members:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question only, does this need to be indented, or is that just style?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like style only!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can't be indented - that's what I had gotten wrong before. :inherited-members: needs to have the same indentation level as :show-inheritance: and the other options, and we can't have any whitespace between these directive options (which is why the jinja template lines start and end with an extra - (this prevents extra whitespace from appearing in the final document)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thank you!

{%- endif %}

{% block methods %}

Expand Down
Loading