Skip to content

Close #6698: doctest: Add :trim-flags: and :no-trim-flags: options#8025

Merged
tk0miya merged 1 commit intosphinx-doc:3.xfrom
tk0miya:6698_no-trim-flags
Aug 5, 2020
Merged

Close #6698: doctest: Add :trim-flags: and :no-trim-flags: options#8025
tk0miya merged 1 commit intosphinx-doc:3.xfrom
tk0miya:6698_no-trim-flags

Conversation

@tk0miya
Copy link
Copy Markdown
Member

@tk0miya tk0miya commented Aug 1, 2020

Feature or Bugfix

  • Feature

Purpose

@tk0miya tk0miya added type:enhancement enhance or introduce a new feature extensions labels Aug 1, 2020
@tk0miya tk0miya added this to the 3.2.0 milestone Aug 1, 2020
@tk0miya tk0miya force-pushed the 6698_no-trim-flags branch from 61717af to c2dd300 Compare August 1, 2020 06:28
Copy link
Copy Markdown
Member

@shimizukawa shimizukawa left a comment

Choose a reason for hiding this comment

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

LGTM with 1 naming suggestion.

Comment thread CHANGES Outdated
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).
@tk0miya tk0miya force-pushed the 6698_no-trim-flags branch from c2dd300 to 059dc10 Compare August 5, 2020 14:39
@tk0miya tk0miya merged commit 784e763 into sphinx-doc:3.x Aug 5, 2020
@tk0miya tk0miya deleted the 6698_no-trim-flags branch August 5, 2020 15:29
@JulienPalard
Copy link
Copy Markdown
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 :no-trim-flags:.

@tk0miya
Copy link
Copy Markdown
Member Author

tk0miya commented Jan 12, 2021

@JulienPalard Sorry, the only what we can do is supporting the latest release. No time and power to support old versions...

@JulienPalard
Copy link
Copy Markdown
Contributor

I understand. Do you have a great idea how we could use :no-trim-flags: while keeping compat with old Sphinx?

@tk0miya
Copy link
Copy Markdown
Member Author

tk0miya commented Jan 12, 2021

Only we can do is patching the doctest directive on building the old Sphinx.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

extensions type:enhancement enhance or introduce a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants