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

Use type and default option to confval in napoleon docs #13094

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Snoopy1866
Copy link
Contributor

@Snoopy1866 Snoopy1866 commented Nov 1, 2024

Subject: Use type and default option to confval in napoleon docs

Feature or Bugfix

  • Feature

Purpose

Use type and default option to confval in napoleon docs.

Detail

None

Relates

None

Copy link
Member

@AA-Turner AA-Turner left a comment

Choose a reason for hiding this comment

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

Please use the new type and default options to confval

@Snoopy1866 Snoopy1866 force-pushed the docs-usage-extension-napoleon-napoleon_attr_annotations branch from 0ec4a68 to 5dccd13 Compare November 4, 2024 00:52
@@ -550,9 +575,10 @@ sure that "sphinx.ext.napoleon" is enabled in ``conf.py``::
.. versionadded:: 3.4

.. confval:: napoleon_custom_sections
:type: `Optional[Sequence[str | Sequence[str, str]]]`
Copy link
Contributor Author

@Snoopy1866 Snoopy1866 Nov 5, 2024

Choose a reason for hiding this comment

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

Is it necessary to use Sequence instead of list or tuple here? And should I use the |, or nested Optional?

@Snoopy1866 Snoopy1866 requested a review from AA-Turner November 5, 2024 03:02
@Snoopy1866 Snoopy1866 changed the title Add the default value of napoleon_attr_annotations Use type and default option to confval in napoleon docs Nov 5, 2024
@Snoopy1866
Copy link
Contributor Author

Snoopy1866 commented Nov 5, 2024

I have updated the PR title to reflect changes not only to the documentation of the napoleon_attr_annotations option but also to all options within sphinx.ext.napoleon.

The previous title no longer accurately represented the scope of the updates.

However, I have not changed the branch name, as doing so would close this PR.

@Snoopy1866
Copy link
Contributor Author

Inspired by the below code, I add the code-py interpreted text role.

.. confval:: latex_logo
:type: :code-py:`str`
:default: :code-py:`''`

@Snoopy1866
Copy link
Contributor Author

readthedocs build succeeded, while github action build failed. It looks confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants