Skip to content

Commit a129ff5

Browse files
author
Release Manager
committedAug 1, 2022
Trac #34162: Fix docstring markup in sage/doctest
Part of #34157: {{{ sage/doctest/sources.py:193:1: RST215 Inline interpreted text or phrase reference start-string without end-string. sage/doctest/sources.py:239:1: RST215 Inline interpreted text or phrase reference start-string without end-string. sage/doctest/sources.py:429:1: RST201 Block quote ends without a blank line; unexpected unindent. sage/doctest/sources.py:431:1: RST201 Block quote ends without a blank line; unexpected unindent. sage/doctest/sources.py:765:1: RST214 Inline literal start-string without end-string. sage/doctest/sources.py:765:1: RST214 Inline literal start-string without end-string. }}} URL: https://trac.sagemath.org/34162 Reported by: klee Ticket author(s): Frédéric Chapoton Reviewer(s): Matthias Koeppe
2 parents a1c99f1 + d7ab884 commit a129ff5

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed
 

‎src/sage/doctest/sources.py

+9-10
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def _process_doc(self, doctests, doc, namespace, start):
193193
194194
- ``namespace`` -- a dictionary or
195195
:class:`sage.doctest.util.RecordingDict`, used in the
196-
creation of new :class:`doctest.DocTest`s.
196+
creation of new :class:`doctest.DocTest` s.
197197
198198
- ``start`` -- an integer, giving the line number of the start
199199
of this docstring in the larger file.
@@ -239,7 +239,7 @@ def _create_doctests(self, namespace, tab_okay=None):
239239
240240
- ``namespace`` -- a dictionary or
241241
:class:`sage.doctest.util.RecordingDict`, used in the
242-
creation of new :class:`doctest.DocTest`s.
242+
creation of new :class:`doctest.DocTest` s.
243243
244244
- ``tab_okay`` -- whether tabs are allowed in this source.
245245
@@ -418,7 +418,7 @@ def __init__(self, basename, source, options, printpath, lineno_shift=0):
418418
DocTestSource.__init__(self, options)
419419

420420
def __iter__(self):
421-
"""
421+
r"""
422422
Iterating over this source yields pairs ``(lineno, line)``.
423423
424424
EXAMPLES::
@@ -755,21 +755,20 @@ def create_doctests(self, namespace):
755755
return self._create_doctests(namespace)
756756

757757
def _test_enough_doctests(self, check_extras=True, verbose=True):
758-
"""
758+
r"""
759759
This function checks to see that the doctests are not getting
760760
unexpectedly skipped. It uses a different (and simpler) code
761761
path than the doctest creation functions, so there are a few
762762
files in Sage that it counts incorrectly.
763763
764764
INPUT:
765765
766-
- ``check_extras`` -- bool (default True), whether to check if
767-
doctests are created that don't correspond to either a
768-
``sage: `` or a ``>>> `` prompt.
766+
- ``check_extras`` -- bool (default ``True``), whether to check if
767+
doctests are created that do not correspond to either a ``sage: ``
768+
or a ``>>> `` prompt
769769
770-
- ``verbose`` -- bool (default True), whether to print
771-
offending line numbers when there are missing or extra
772-
tests.
770+
- ``verbose`` -- bool (default ``True``), whether to print
771+
offending line numbers when there are missing or extra tests
773772
774773
TESTS::
775774

0 commit comments

Comments
 (0)
Please sign in to comment.