You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This test also passes, and also requires a directive to do
so::
>>> print(list(range(20))) # doctest: +ELLIPSIS [0, 1, ..., 18, 19]
So in this specific case, we need the "# doctest: +ELLIPSIS" to still be visible in the generated documents, because it's part of what's we're documenting.
Describe the solution you'd like
I'd like to be able to locally disable the stripping by something like:
Describe alternatives you've considered
In cpython we were messing with self.highlighter.trim_doctest_flags, which is now deprecated. trim_doctest_flags still exists but as a global option, so it's harder to trick it to act on a single code block with not too much ugly tricks.
…options
To control trimming doctest flags manually, this adds new options
:trim-flags: and :no-trim-flags: to doctest directives. It helps
to describes doctest module itself in python doc (see sphinx-doc#6698).
…options
To control trimming doctest flags manually, this adds new options
:trim-flags: and :no-trim-flags: to doctest directives. It helps
to describes doctest module itself in python doc (see sphinx-doc#6698).
Is your feature request related to a problem? Please describe.
In cpython, we have the doctest documentation, in this we're having for example:
So in this specific case, we need the "# doctest: +ELLIPSIS" to still be visible in the generated documents, because it's part of what's we're documenting.
Describe the solution you'd like
I'd like to be able to locally disable the stripping by something like:
Describe alternatives you've considered
In cpython we were messing with
self.highlighter.trim_doctest_flags
, which is now deprecated.trim_doctest_flags
still exists but as a global option, so it's harder to trick it to act on a single code block with not too much ugly tricks.Additional context
https://bugs.python.org/issue36675
The text was updated successfully, but these errors were encountered: