Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 93a56cd

Browse files
committed
Doc: fix default role usage (except in unittest mock docs)
1 parent aea7f4a commit 93a56cd

14 files changed

Lines changed: 25 additions & 25 deletions

File tree

Doc/c-api/exceptions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ NULL pointer for use in a ``return`` statement.
111111
112112
.. c:function:: PyObject* PyErr_FormatV(PyObject *exception, const char *format, va_list vargs)
113113
114-
Same as :c:func:`PyErr_Format`, but taking a `va_list` argument rather
114+
Same as :c:func:`PyErr_Format`, but taking a :c:type:`va_list` argument rather
115115
than a variable number of arguments.
116116
117117
.. versionadded:: 3.5

Doc/distutils/examples.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,20 +286,20 @@ Reading the metadata
286286

287287
The :func:`distutils.core.setup` function provides a command-line interface
288288
that allows you to query the metadata fields of a project through the
289-
`setup.py` script of a given project::
289+
``setup.py`` script of a given project::
290290

291291
$ python setup.py --name
292292
distribute
293293

294-
This call reads the `name` metadata by running the
294+
This call reads the ``name`` metadata by running the
295295
:func:`distutils.core.setup` function. Although, when a source or binary
296296
distribution is created with Distutils, the metadata fields are written
297297
in a static file called :file:`PKG-INFO`. When a Distutils-based project is
298298
installed in Python, the :file:`PKG-INFO` file is copied alongside the modules
299299
and packages of the distribution under :file:`NAME-VERSION-pyX.X.egg-info`,
300-
where `NAME` is the name of the project, `VERSION` its version as defined
301-
in the Metadata, and `pyX.X` the major and minor version of Python like
302-
`2.7` or `3.2`.
300+
where ``NAME`` is the name of the project, ``VERSION`` its version as defined
301+
in the Metadata, and ``pyX.X`` the major and minor version of Python like
302+
``2.7`` or ``3.2``.
303303

304304
You can read back this static file, by using the
305305
:class:`distutils.dist.DistributionMetadata` class and its

Doc/howto/pyporting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ Update ``map`` for imbalanced input sequences
535535
'''''''''''''''''''''''''''''''''''''''''''''
536536

537537
With Python 2, when ``map`` was given more than one input sequence it would pad
538-
the shorter sequences with `None` values, returning a sequence as long as the
538+
the shorter sequences with ``None`` values, returning a sequence as long as the
539539
longest input sequence.
540540

541541
With Python 3, if the input sequences to ``map`` are of unequal length, ``map``

Doc/library/ctypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ As we can easily check, our array is sorted now::
10321032
outside of Python's control (e.g. by the foreign code that calls the
10331033
callback), ctypes creates a new dummy Python thread on every invocation. This
10341034
behavior is correct for most purposes, but it means that values stored with
1035-
`threading.local` will *not* survive across different callbacks, even when
1035+
:class:`threading.local` will *not* survive across different callbacks, even when
10361036
those calls are made from the same C thread.
10371037

10381038
.. _ctypes-accessing-values-exported-from-dlls:

Doc/library/enum.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ whitespace-separated string of names, a sequence of names, a sequence of
401401
2-tuples with key/value pairs, or a mapping (e.g. dictionary) of names to
402402
values. The last two options enable assigning arbitrary values to
403403
enumerations; the others auto-assign increasing integers starting with 1 (use
404-
the `start` parameter to specify a different starting value). A
404+
the ``start`` parameter to specify a different starting value). A
405405
new class derived from :class:`Enum` is returned. In other words, the above
406406
assignment to :class:`Animal` is equivalent to::
407407

Doc/library/multiprocessing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1965,18 +1965,18 @@ with the :class:`Pool` class.
19651965

19661966
.. method:: starmap(func, iterable[, chunksize])
19671967

1968-
Like :meth:`map` except that the elements of the `iterable` are expected
1968+
Like :meth:`map` except that the elements of the *iterable* are expected
19691969
to be iterables that are unpacked as arguments.
19701970

1971-
Hence an `iterable` of `[(1,2), (3, 4)]` results in `[func(1,2),
1972-
func(3,4)]`.
1971+
Hence an *iterable* of ``[(1,2), (3, 4)]`` results in ``[func(1,2),
1972+
func(3,4)]``.
19731973

19741974
.. versionadded:: 3.3
19751975

19761976
.. method:: starmap_async(func, iterable[, chunksize[, callback[, error_back]]])
19771977

19781978
A combination of :meth:`starmap` and :meth:`map_async` that iterates over
1979-
`iterable` of iterables and calls `func` with the iterables unpacked.
1979+
*iterable* of iterables and calls *func* with the iterables unpacked.
19801980
Returns a result object.
19811981

19821982
.. versionadded:: 3.3

Doc/library/pickle.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ methods:
504504
.. method:: object.__getnewargs__()
505505

506506
This method serve a similar purpose as :meth:`__getnewargs_ex__` but
507-
for protocols 2 and newer. It must return a tuple of arguments `args`
507+
for protocols 2 and newer. It must return a tuple of arguments ``args``
508508
which will be passed to the :meth:`__new__` method upon unpickling.
509509

510510
In protocols 4 and newer, :meth:`__getnewargs__` will not be called if

Doc/library/poplib.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
This module defines a class, :class:`POP3`, which encapsulates a connection to a
1616
POP3 server and implements the protocol as defined in :rfc:`1939`. The
1717
:class:`POP3` class supports both the minimal and optional command sets from
18-
:rfc:`1939`. The :class:`POP3` class also supports the `STLS` command introduced
18+
:rfc:`1939`. The :class:`POP3` class also supports the ``STLS`` command introduced
1919
in :rfc:`2595` to enable encrypted communication on an already established connection.
2020

2121
Additionally, this module provides a class :class:`POP3_SSL`, which provides

Doc/library/sys.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ always available.
667667
an underscore, and are not described here. Regardless of its contents,
668668
:data:`sys.implementation` will not change during a run of the interpreter,
669669
nor between implementation versions. (It may change between Python
670-
language versions, however.) See `PEP 421` for more information.
670+
language versions, however.) See :pep:`421` for more information.
671671

672672
.. versionadded:: 3.3
673673

Doc/library/test.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ A basic boilerplate is often used::
8585

8686
This code pattern allows the testing suite to be run by :mod:`test.regrtest`,
8787
on its own as a script that supports the :mod:`unittest` CLI, or via the
88-
`python -m unittest` CLI.
88+
``python -m unittest`` CLI.
8989

9090
The goal for regression testing is to try to break code. This leads to a few
9191
guidelines to be followed:
@@ -141,9 +141,9 @@ guidelines to be followed:
141141
arg = (1, 2, 3)
142142

143143
When using this pattern, remember that all classes that inherit from
144-
`unittest.TestCase` are run as tests. The `Mixin` class in the example above
144+
:class:`unittest.TestCase` are run as tests. The :class:`Mixin` class in the example above
145145
does not have any data and so can't be run by itself, thus it does not
146-
inherit from `unittest.TestCase`.
146+
inherit from :class:`unittest.TestCase`.
147147

148148

149149
.. seealso::

0 commit comments

Comments
 (0)