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

Conversation

melissawm
Copy link
Member

References and relevant issues

Follow-up to #316

Description

I inadvertently added a Jinja syntax error in #316. Also adds a comment to explain why this is necessary.

I inadvertently added a Jinja syntax error in naparigh-316. Also adds a comment to explain why this is necessary.
@melissawm melissawm added the bug Something isn't working label Apr 12, 2024
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Apr 12, 2024
@melissawm
Copy link
Member Author

Before: https://napari.org/dev/api/napari.components.Camera.html (for example)

Screenshot_20240412_153727

After:

Screenshot_20240412_160930

@psobolewskiPhD psobolewskiPhD added this to the 0.5.0 milestone Apr 12, 2024
Copy link
Member

@psobolewskiPhD psobolewskiPhD left a comment

Choose a reason for hiding this comment

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

looks good to me!
thanks!

{% 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!

@psobolewskiPhD psobolewskiPhD merged commit 584098a into napari:main Apr 21, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants