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

Update docs #500

Merged

Conversation

guilhermeleobas
Copy link
Contributor

No description provided.

@guilhermeleobas guilhermeleobas added the documentation Document a feature label Jun 23, 2022
@guilhermeleobas guilhermeleobas self-assigned this Jun 23, 2022
@guilhermeleobas guilhermeleobas force-pushed the guilhermeleobas/update-docs branch from 9c07ab1 to 97acdda Compare June 23, 2022 03:25
@guilhermeleobas guilhermeleobas requested a review from tupui June 23, 2022 12:39
@guilhermeleobas guilhermeleobas marked this pull request as ready for review June 23, 2022 12:39
@tupui
Copy link
Contributor

tupui commented Jun 23, 2022

For the documentation of dunder methods, you can try this to use special-members https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html?highlight=special-members#confval-autodoc_default_options

@guilhermeleobas
Copy link
Contributor Author

Is there a way to show dunder methods only for a specific class?

@tupui
Copy link
Contributor

tupui commented Jun 23, 2022

Is there a way to show dunder methods only for a specific class?

Yes, instead you need to add the directive just for the class. See https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html?highlight=special-members#directive-option-automodule-special-members

.. autoclass:: my.Class
   :members:
   :special-members:

Copy link
Contributor

@pearu pearu left a comment

Choose a reason for hiding this comment

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

LGTM!

@guilhermeleobas guilhermeleobas merged commit 811285b into heavyai:main Jul 11, 2022
@guilhermeleobas guilhermeleobas deleted the guilhermeleobas/update-docs branch July 11, 2022 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Document a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants