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
bpo-34962: make doctest in Doc now passes, and is enforced in CI #9806
Conversation
Needs python/docsbuild-scripts#59 to avoid a huge flood of warnings (yet the docs build properly at the end). |
Doc/library/re.rst
Outdated
objects a little more gracefully: | ||
|
||
.. testcode:: | ||
objects a little more gracefully: :: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something: ::
is equivalent to something::
, but the shorter the better.
In reST ::
touching a word is introducing a block and displaying :
, while ::
after a space is only introducing a block, not displaying :
. So blah::
and blah: ::
are the same. (Hence the usage of : ::
in the french translation).
Doc/library/re.rst
Outdated
:meth:`~Match.group` method of the match object in the following manner: | ||
|
||
.. doctest:: | ||
:meth:`~Match.group` method of the match object in the following manner: :: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks strange to me to remove the doctest (.. doctest::
from line 1274) while fixing it (adding pair = ...
line 1272)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find the reason, but the evaluation context of the second block of code didn't contain the definition of pair
:/
... result = some_function() | ||
... assert result == 'the result' | ||
>>> def some_function(): | ||
... instance = module.Foo() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised this works, why not keeping the indentation of the body of the function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe an error from my part.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I remove the DO-NOT-MERGE label as we're now having Sphinx 1.8.1 on docs.python.org. |
https://bugs.python.org/issue34962