Skip to content

Commit e8e7ffd

Browse files
authored
Doc: Fix documentation links that pointed to other objects (#160871)
1 parent e5fad04 commit e8e7ffd

27 files changed

Lines changed: 115 additions & 102 deletions

‎Doc/library/calendar.rst‎

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

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

435-
Prints the calendar for an entire year as returned by :func:`calendar`.
435+
Prints the calendar for an entire year as returned by
436+
:func:`~calendar.calendar`.
436437

437438

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

‎Doc/library/ctypes.rst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3758,9 +3758,9 @@ fields, or any other data types containing pointer type fields.
37583758
.. class:: CFieldInfo(anonymous=False, bit_width=None)
37593759
:module: ctypes.util
37603760

3761-
Information regarding a structure field defined by the :func:`struct`
3762-
decorator. This should be used in the second argument of a
3763-
:class:`typing.Annotated` wrapping a ctypes type.
3761+
Information regarding a structure field defined by the
3762+
:func:`~ctypes.util.struct` decorator. This should be used in the second
3763+
argument of a :class:`typing.Annotated` wrapping a ctypes type.
37643764

37653765
*anonymous* specifies whether the field will be present in the
37663766
:attr:`~ctypes.Structure._anonymous_` attribute of the generated class.

‎Doc/library/datetime.rst‎

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

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

‎Doc/library/dis.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,9 @@ operation is being performed, so the intermediate analysis object isn't useful:
395395
source line information (if any) is taken directly from the disassembled code
396396
object.
397397

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

400-
The *show_jit* parameter works as it does in :func:`dis`.
400+
The *show_jit* parameter works as it does in :func:`~dis.dis`.
401401

402402
.. versionadded:: 3.4
403403

‎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
@@ -27,13 +27,14 @@ The :mod:`!getpass` module provides two functions:
2727
typed character is replaced by it. For example, ``echo_char='*'`` will
2828
display asterisks instead of the actual input.
2929

30-
If echo-free input is unavailable, :func:`getpass` falls back to printing
31-
a warning message to *stream* and reading from :data:`sys.stdin` and
30+
If echo-free input is unavailable, :func:`~getpass.getpass` falls back to
31+
printing a warning message to *stream* and reading from :data:`sys.stdin` and
3232
issuing a :exc:`GetPassWarning`.
3333

3434
.. note::
35-
If you call :func:`getpass` from within IDLE, the input may be done in the
36-
terminal you launched IDLE from rather than the idle window itself.
35+
If you call :func:`~getpass.getpass` from within IDLE, the input may be
36+
done in the terminal you launched IDLE from rather than the idle window
37+
itself.
3738

3839
.. note::
3940
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
@@ -89,8 +89,9 @@ class-based API instead.
8989
.. function:: dnpgettext(domain, context, singular, plural, n, /)
9090

9191
Similar to the corresponding functions without the ``p`` in the prefix (that
92-
is, :func:`gettext`, :func:`dgettext`, :func:`ngettext`, :func:`dngettext`),
93-
but the translation is restricted to the given message *context*.
92+
is, :func:`~gettext.gettext`, :func:`dgettext`, :func:`ngettext`,
93+
:func:`dngettext`), but the translation is restricted to the given message
94+
*context*.
9495

9596
.. versionadded:: 3.8
9697

@@ -426,7 +427,8 @@ take the following steps:
426427

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

431433
filename = 'mylog.txt'
432434
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
@@ -182,7 +182,7 @@ Examples
182182

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

‎Doc/library/locale.rst‎

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

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

0 commit comments

Comments
 (0)