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

Format options for doctest directives #13107

Merged
merged 6 commits into from
Nov 13, 2024
Merged

Conversation

timhoffm
Copy link
Contributor

@timhoffm timhoffm commented Nov 6, 2024

Convert to standard syntax conventions we use for directive options.

@jdillard
Copy link
Contributor

jdillard commented Nov 7, 2024


Whether to trim remove doctest flags (comments looking like
``# doctest: FLAG, ...``) at the ends of lines and ``<BLANKLINE>`` markers
individually. Default is ``trim-doctest-flags``.
Copy link
Member

Choose a reason for hiding this comment

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

Should we have a :default: option to .. rst:directive:option::?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Theoretically yes. In practice, I believe it's not worth it. Without checking, I assume only a minor part of options have a real default value, instead they are often flags, or the default is some form of "emtpy"/not given e.g. in the case of :caption:, or the default is a behavior that needs a sentence of description, and does not have a simple value to list in a :default: option.
So, I'm fine with writing out "Default is ..." for the cases that make sense.

doc/usage/extensions/doctest.rst Outdated Show resolved Hide resolved
doc/usage/extensions/doctest.rst Outdated Show resolved Hide resolved
doc/usage/extensions/doctest.rst Outdated Show resolved Hide resolved
doc/usage/extensions/doctest.rst Outdated Show resolved Hide resolved
doc/usage/extensions/doctest.rst Outdated Show resolved Hide resolved
doc/usage/extensions/doctest.rst Outdated Show resolved Hide resolved
doc/usage/extensions/doctest.rst Outdated Show resolved Hide resolved
doc/usage/extensions/doctest.rst Outdated Show resolved Hide resolved
doc/usage/extensions/doctest.rst Outdated Show resolved Hide resolved
@AA-Turner AA-Turner changed the title Format doctest options in docs Format options for doctest directives Nov 13, 2024
@AA-Turner AA-Turner merged commit a2db696 into sphinx-doc:master Nov 13, 2024
8 checks passed
@timhoffm timhoffm deleted the doc-doctest branch November 14, 2024 00:16
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.

4 participants