Close #6698: doctest: Add :trim-flags: and :no-trim-flags: options#8025
Merged
tk0miya merged 1 commit intosphinx-doc:3.xfrom Aug 5, 2020
Merged
Close #6698: doctest: Add :trim-flags: and :no-trim-flags: options#8025tk0miya merged 1 commit intosphinx-doc:3.xfrom
tk0miya merged 1 commit intosphinx-doc:3.xfrom
Conversation
61717af to
c2dd300
Compare
shimizukawa
approved these changes
Aug 4, 2020
Member
shimizukawa
left a comment
There was a problem hiding this comment.
LGTM with 1 naming suggestion.
To control trimming doctest flags manually, this adds new options :trim-doctest-flags: and :no-trim-doctest-flags: to doctest directives. It helps to describes doctest module itself in python doc (see sphinx-doc#6698).
c2dd300 to
059dc10
Compare
Contributor
|
Hi @tk0miya, can this be backported to Sphinx 2? It would greatly help distribs having Sphinx 2 and wanting to ship Python 3.10, which relies on |
Member
Author
|
@JulienPalard Sorry, the only what we can do is supporting the latest release. No time and power to support old versions... |
Contributor
|
I understand. Do you have a great idea how we could use :no-trim-flags: while keeping compat with old Sphinx? |
Member
Author
|
Only we can do is patching the doctest directive on building the old Sphinx. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature or Bugfix
Purpose
:trim-flags: and :no-trim-flags: to doctest directives. It helps
to describes doctest module itself in python doc (see doctest: Need a way to locally disable the trimming of doctest flags #6698).