Skip to content

Commit 6b4c847

Browse files
committed
Doc: fix default role usage (except in unittest mock docs)
1 parent ed14c86 commit 6b4c847

12 files changed

Lines changed: 23 additions & 23 deletions

File tree

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/multiprocessing.rst

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

19631963
.. method:: starmap(func, iterable[, chunksize])
19641964

1965-
Like :meth:`map` except that the elements of the `iterable` are expected
1965+
Like :meth:`map` except that the elements of the *iterable* are expected
19661966
to be iterables that are unpacked as arguments.
19671967

1968-
Hence an `iterable` of `[(1,2), (3, 4)]` results in `[func(1,2),
1969-
func(3,4)]`.
1968+
Hence an *iterable* of ``[(1,2), (3, 4)]`` results in ``[func(1,2),
1969+
func(3,4)]``.
19701970

19711971
.. versionadded:: 3.3
19721972

19731973
.. method:: starmap_async(func, iterable[, chunksize[, callback[, error_back]]])
19741974

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

19791979
.. 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::

Doc/library/xmlrpc.server.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ server::
184184
# Print list of available methods
185185
print(s.system.listMethods())
186186

187-
The following example included in `Lib/xmlrpc/server.py` module shows a server
188-
allowing dotted names and registering a multicall function.
187+
The following example included in the :file:`Lib/xmlrpc/server.py` module shows
188+
a server allowing dotted names and registering a multicall function.
189189

190190
.. warning::
191191

Doc/tutorial/inputoutput.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@ first::
323323
18
324324

325325
``f.tell()`` returns an integer giving the file object's current position in the file
326-
represented as number of bytes from the beginning of the file when in `binary mode` and
327-
an opaque number when in `text mode`.
326+
represented as number of bytes from the beginning of the file when in binary mode and
327+
an opaque number when in text mode.
328328

329329
To change the file object's position, use ``f.seek(offset, from_what)``. The position is computed
330330
from adding *offset* to a reference point; the reference point is selected by

0 commit comments

Comments
 (0)