[Python-checkins] cpython (2.7): Avoid using the default reST role. Makes Doc/tools/rstlint.py happy.

eric.araujo python-checkins at python.org
Fri Sep 2 18:03:03 CEST 2011


http://hg.python.org/cpython/rev/901c1f025d31
changeset: 72196:901c1f025d31
branch: 2.7
parent: 72153:4dcbae65df3f
user: Éric Araujo <merwok at netwok.org>
date: Thu Sep 01 19:49:31 2011 +0200
summary:
 Avoid using the default reST role. Makes Doc/tools/rstlint.py happy.
files:
 Doc/documenting/building.rst | 10 +++++-----
 Doc/library/struct.rst | 4 ++--
 Doc/library/unittest.rst | 10 +++++-----
 Doc/library/urllib2.rst | 2 +-
 4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/Doc/documenting/building.rst b/Doc/documenting/building.rst
--- a/Doc/documenting/building.rst
+++ b/Doc/documenting/building.rst
@@ -17,9 +17,9 @@
 cd Doc
 make html
 
-to check out the necessary toolset in the `tools/` subdirectory and build the
-HTML output files. To view the generated HTML, point your favorite browser at
-the top-level index `build/html/index.html` after running "make".
+to check out the necessary toolset in the :file:`tools/` subdirectory and build
+the HTML output files. To view the generated HTML, point your favorite browser
+at the top-level index :file:`build/html/index.html` after running "make".
 
 Available make targets are:
 
@@ -50,10 +50,10 @@
 
 * "pydoc-topics", which builds a Python module containing a dictionary with
 plain text documentation for the labels defined in
- `tools/sphinxext/pyspecific.py` -- pydoc needs these to show topic and
+ :file:`tools/sphinxext/pyspecific.py` -- pydoc needs these to show topic and
 keyword help.
 
-A "make update" updates the Subversion checkouts in `tools/`.
+A "make update" updates the Subversion checkouts in :file:`tools/`.
 
 
 Without make
diff --git a/Doc/library/struct.rst b/Doc/library/struct.rst
--- a/Doc/library/struct.rst
+++ b/Doc/library/struct.rst
@@ -22,8 +22,8 @@
 alignment is taken into account when unpacking. This behavior is chosen so
 that the bytes of a packed struct correspond exactly to the layout in memory
 of the corresponding C struct. To handle platform-independent data formats
- or omit implicit pad bytes, use `standard` size and alignment instead of
- `native` size and alignment: see :ref:`struct-alignment` for details.
+ or omit implicit pad bytes, use ``standard`` size and alignment instead of
+ ``native`` size and alignment: see :ref:`struct-alignment` for details.
 
 Functions and Exceptions
 ------------------------
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -307,7 +307,7 @@
 
 Test discovery loads tests by importing them. Once test discovery has
 found all the test files from the start directory you specify it turns the
- paths into package names to import. For example `foo/bar/baz.py` will be
+ paths into package names to import. For example :file:`foo/bar/baz.py` will be
 imported as ``foo.bar.baz``.
 
 If you have a package installed globally and attempt test discovery on
@@ -905,11 +905,11 @@
 +---------------------------------------------------------+--------------------------------------+------------+
 | Method | Checks that | New in |
 +=========================================================+======================================+============+
- | :meth:`assertRaises(exc, fun, *args, **kwds) | ``fun(*args, **kwds)`` raises `exc` | |
+ | :meth:`assertRaises(exc, fun, *args, **kwds) | ``fun(*args, **kwds)`` raises *exc* | |
 | <TestCase.assertRaises>` | | |
 +---------------------------------------------------------+--------------------------------------+------------+
- | :meth:`assertRaisesRegexp(exc, re, fun, *args, **kwds) | ``fun(*args, **kwds)`` raises `exc` | 2.7 |
- | <TestCase.assertRaisesRegexp>` | and the message matches `re` | |
+ | :meth:`assertRaisesRegexp(exc, re, fun, *args, **kwds) | ``fun(*args, **kwds)`` raises *exc* | 2.7 |
+ | <TestCase.assertRaisesRegexp>` | and the message matches *re* | |
 +---------------------------------------------------------+--------------------------------------+------------+
 
 .. method:: assertRaises(exception, callable, *args, **kwds)
@@ -995,7 +995,7 @@
 | <TestCase.assertItemsEqual>` | works with unhashable objs | |
 +---------------------------------------+--------------------------------+--------------+
 | :meth:`assertDictContainsSubset(a, b) | all the key/value pairs | 2.7 |
- | <TestCase.assertDictContainsSubset>` | in `a` exist in `b` | |
+ | <TestCase.assertDictContainsSubset>` | in *a* exist in *b* | |
 +---------------------------------------+--------------------------------+--------------+
 
 
diff --git a/Doc/library/urllib2.rst b/Doc/library/urllib2.rst
--- a/Doc/library/urllib2.rst
+++ b/Doc/library/urllib2.rst
@@ -36,7 +36,7 @@
 :mimetype:`application/x-www-form-urlencoded` format. The
 :func:`urllib.urlencode` function takes a mapping or sequence of 2-tuples and
 returns a string in this format. urllib2 module sends HTTP/1.1 requests with
- `Connection:close` header included.
+ ``Connection:close`` header included.
 
 The optional *timeout* parameter specifies a timeout in seconds for blocking
 operations like the connection attempt (if not specified, the global default
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /