Skip to content

Commit 1ca9099

Browse files
committed
[3.14] Doc: Fix documentation links that pointed to other objects (GH-160871)
(cherry picked from commit e8e7ffd) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
1 parent c6bc883 commit 1ca9099

25 files changed

Lines changed: 109 additions & 97 deletions

‎Doc/library/calendar.rst‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ For simple text calendars this module provides the following functions.
429429

430430
.. function:: prcal(theyear, w=0, l=0, c=6, m=3)
431431

432-
Prints the calendar for an entire year as returned by :func:`calendar`.
432+
Prints the calendar for an entire year as returned by
433+
:func:`~calendar.calendar`.
433434

434435

435436
.. function:: calendar(theyear, w=2, l=1, c=6, m=3)

‎Doc/library/datetime.rst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,9 +1385,9 @@ Instance methods:
13851385
hour=self.hour, minute=self.minute, second=self.second, microsecond=self.microsecond, \
13861386
tzinfo=self.tzinfo, *, fold=0)
13871387
1388-
Return a new :class:`datetime` object with the same attributes, but with
1389-
specified parameters updated. Note that ``tzinfo=None`` can be specified to
1390-
create a naive datetime from an aware datetime with no conversion of date
1388+
Return a new :class:`~datetime.datetime` object with the same attributes, but
1389+
with specified parameters updated. Note that ``tzinfo=None`` can be specified
1390+
to create a naive datetime from an aware datetime with no conversion of date
13911391
and time data.
13921392

13931393
:class:`.datetime` objects are also supported by generic function

‎Doc/library/dis.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ operation is being performed, so the intermediate analysis object isn't useful:
375375
source line information (if any) is taken directly from the disassembled code
376376
object.
377377

378-
The *adaptive* parameter works as it does in :func:`dis`.
378+
The *adaptive* parameter works as it does in :func:`~dis.dis`.
379379

380380
.. versionadded:: 3.4
381381

‎Doc/library/fnmatch.rst‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ a :class:`!str` filename, and vice-versa.
5353

5454
Finally, note that :deco:`functools.lru_cache` with a *maxsize* of 32768
5555
is used to cache the (typed) compiled regex patterns in the following
56-
functions: :func:`fnmatch`, :func:`fnmatchcase`, :func:`.filter`, :func:`.filterfalse`.
56+
functions: :func:`~fnmatch.fnmatch`, :func:`fnmatchcase`, :func:`.filter`,
57+
:func:`.filterfalse`.
5758

5859

5960
.. function:: fnmatch(name, pat)

‎Doc/library/getopt.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ exception:
8080

8181
.. function:: gnu_getopt(args, shortopts, longopts=[])
8282

83-
This function works like :func:`getopt`, except that GNU style scanning mode is
84-
used by default. This means that option and non-option arguments may be
85-
intermixed. The :func:`getopt` function stops processing options as soon as a
86-
non-option argument is encountered.
83+
This function works like :func:`~getopt.getopt`, except that GNU style
84+
scanning mode is used by default. This means that option and non-option
85+
arguments may be intermixed. The :func:`~getopt.getopt` function stops
86+
processing options as soon as a non-option argument is encountered.
8787

8888
If the first character of the option string is ``'+'``, or if the environment
8989
variable :envvar:`!POSIXLY_CORRECT` is set, then option processing stops as

‎Doc/library/getpass.rst‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ The :mod:`!getpass` module provides two functions:
3131
typed character is replaced by it. For example, ``echo_char='*'`` will
3232
display asterisks instead of the actual input.
3333

34-
If echo free input is unavailable getpass() falls back to printing
35-
a warning message to *stream* and reading from ``sys.stdin`` and
34+
If echo-free input is unavailable, :func:`~getpass.getpass` falls back to
35+
printing a warning message to *stream* and reading from :data:`sys.stdin` and
3636
issuing a :exc:`GetPassWarning`.
3737

3838
.. note::
39-
If you call getpass from within IDLE, the input may be done in the
40-
terminal you launched IDLE from rather than the idle window itself.
39+
If you call :func:`~getpass.getpass` from within IDLE, the input may be
40+
done in the terminal you launched IDLE from rather than the idle window
41+
itself.
4142

4243
.. note::
4344
On Unix systems, when *echo_char* is set, the terminal will be

‎Doc/library/gettext.rst‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ class-based API instead.
9292
.. function:: dnpgettext(domain, context, singular, plural, n, /)
9393

9494
Similar to the corresponding functions without the ``p`` in the prefix (that
95-
is, :func:`gettext`, :func:`dgettext`, :func:`ngettext`, :func:`dngettext`),
96-
but the translation is restricted to the given message *context*.
95+
is, :func:`~gettext.gettext`, :func:`dgettext`, :func:`ngettext`,
96+
:func:`dngettext`), but the translation is restricted to the given message
97+
*context*.
9798

9899
.. versionadded:: 3.8
99100

@@ -429,7 +430,8 @@ take the following steps:
429430

430431
In order to prepare your code for I18N, you need to look at all the strings in
431432
your files. Any string that needs to be translated should be marked by wrapping
432-
it in ``_('...')`` --- that is, a call to the function :func:`_ <gettext>`. For example::
433+
it in ``_('...')`` --- that is, a call to the function
434+
:func:`_ <gettext.gettext>`. For example::
433435

434436
filename = 'mylog.txt'
435437
message = _('writing a log message')

‎Doc/library/glob.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ The :mod:`!glob` module defines the following functions:
102102
.. function:: iglob(pathname, *, root_dir=None, dir_fd=None, recursive=False, \
103103
include_hidden=False)
104104

105-
Return an :term:`iterator` which yields the same values as :func:`glob`
105+
Return an :term:`iterator` which yields the same values as :func:`~glob.glob`
106106
without actually storing them all simultaneously.
107107

108108
.. audit-event:: glob.glob pathname,recursive glob.iglob
@@ -181,7 +181,7 @@ Examples
181181

182182
Consider a directory containing the following files:
183183
:file:`1.gif`, :file:`2.txt`, :file:`card.gif` and a subdirectory :file:`sub`
184-
which contains only the file :file:`3.txt`. :func:`glob` will produce
184+
which contains only the file :file:`3.txt`. :func:`~glob.glob` will produce
185185
the following results. Notice how any leading components of the path are
186186
preserved. ::
187187

‎Doc/library/locale.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ Access to message catalogs
707707
.. function:: bind_textdomain_codeset(domain, codeset)
708708

709709
The locale module exposes the C library's gettext interface on systems that
710-
provide this interface. It consists of the functions :func:`gettext`,
710+
provide this interface. It consists of the functions :func:`~locale.gettext`,
711711
:func:`dgettext`, :func:`dcgettext`, :func:`textdomain`, :func:`bindtextdomain`,
712712
and :func:`bind_textdomain_codeset`. These are similar to the same functions in
713713
the :mod:`gettext` module, but use the C library's binary format for message

‎Doc/library/marshal.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ this module. The following types are supported:
5757
therein are themselves supported.
5858
Recursive containers are supported since :data:`version` 3.
5959
* The singletons :const:`None`, :const:`Ellipsis` and :exc:`StopIteration`.
60-
* :class:`code` objects, if *allow_code* is true. See note above about
61-
version dependence.
60+
* :class:`code <types.CodeType>` objects, if *allow_code* is true. See note
61+
above about version dependence.
6262

6363
.. versionchanged:: 3.4
6464

0 commit comments

Comments
 (0)