Skip to content

Commit fcebf5a

Browse files
miss-islingtonYuki Kobayashi
andauthored
[3.13] gh-110631: Fix some incorrect indents in the documentation (GH-129312) (#134420)
Co-authored-by: Yuki Kobayashi <[email protected]>
1 parent f5de063 commit fcebf5a

File tree

4 files changed

+69
-69
lines changed

4 files changed

+69
-69
lines changed

Doc/library/functions.rst

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,44 +1147,44 @@ are always available. They are listed here in alphabetical order.
11471147

11481148
.. function:: locals()
11491149

1150-
Return a mapping object representing the current local symbol table, with
1151-
variable names as the keys, and their currently bound references as the
1152-
values.
1153-
1154-
At module scope, as well as when using :func:`exec` or :func:`eval` with
1155-
a single namespace, this function returns the same namespace as
1156-
:func:`globals`.
1157-
1158-
At class scope, it returns the namespace that will be passed to the
1159-
metaclass constructor.
1160-
1161-
When using ``exec()`` or ``eval()`` with separate local and global
1162-
arguments, it returns the local namespace passed in to the function call.
1163-
1164-
In all of the above cases, each call to ``locals()`` in a given frame of
1165-
execution will return the *same* mapping object. Changes made through
1166-
the mapping object returned from ``locals()`` will be visible as assigned,
1167-
reassigned, or deleted local variables, and assigning, reassigning, or
1168-
deleting local variables will immediately affect the contents of the
1169-
returned mapping object.
1170-
1171-
In an :term:`optimized scope` (including functions, generators, and
1172-
coroutines), each call to ``locals()`` instead returns a fresh dictionary
1173-
containing the current bindings of the function's local variables and any
1174-
nonlocal cell references. In this case, name binding changes made via the
1175-
returned dict are *not* written back to the corresponding local variables
1176-
or nonlocal cell references, and assigning, reassigning, or deleting local
1177-
variables and nonlocal cell references does *not* affect the contents
1178-
of previously returned dictionaries.
1179-
1180-
Calling ``locals()`` as part of a comprehension in a function, generator, or
1181-
coroutine is equivalent to calling it in the containing scope, except that
1182-
the comprehension's initialised iteration variables will be included. In
1183-
other scopes, it behaves as if the comprehension were running as a nested
1184-
function.
1185-
1186-
Calling ``locals()`` as part of a generator expression is equivalent to
1187-
calling it in a nested generator function.
1150+
Return a mapping object representing the current local symbol table, with
1151+
variable names as the keys, and their currently bound references as the
1152+
values.
1153+
1154+
At module scope, as well as when using :func:`exec` or :func:`eval` with
1155+
a single namespace, this function returns the same namespace as
1156+
:func:`globals`.
1157+
1158+
At class scope, it returns the namespace that will be passed to the
1159+
metaclass constructor.
1160+
1161+
When using ``exec()`` or ``eval()`` with separate local and global
1162+
arguments, it returns the local namespace passed in to the function call.
1163+
1164+
In all of the above cases, each call to ``locals()`` in a given frame of
1165+
execution will return the *same* mapping object. Changes made through
1166+
the mapping object returned from ``locals()`` will be visible as assigned,
1167+
reassigned, or deleted local variables, and assigning, reassigning, or
1168+
deleting local variables will immediately affect the contents of the
1169+
returned mapping object.
1170+
1171+
In an :term:`optimized scope` (including functions, generators, and
1172+
coroutines), each call to ``locals()`` instead returns a fresh dictionary
1173+
containing the current bindings of the function's local variables and any
1174+
nonlocal cell references. In this case, name binding changes made via the
1175+
returned dict are *not* written back to the corresponding local variables
1176+
or nonlocal cell references, and assigning, reassigning, or deleting local
1177+
variables and nonlocal cell references does *not* affect the contents
1178+
of previously returned dictionaries.
1179+
1180+
Calling ``locals()`` as part of a comprehension in a function, generator, or
1181+
coroutine is equivalent to calling it in the containing scope, except that
1182+
the comprehension's initialised iteration variables will be included. In
1183+
other scopes, it behaves as if the comprehension were running as a nested
1184+
function.
1185+
1186+
Calling ``locals()`` as part of a generator expression is equivalent to
1187+
calling it in a nested generator function.
11881188

11891189
.. versionchanged:: 3.12
11901190
The behaviour of ``locals()`` in a comprehension has been updated as

Doc/library/importlib.resources.abc.rst

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,44 +49,44 @@
4949
.. method:: open_resource(resource)
5050
:abstractmethod:
5151

52-
Returns an opened, :term:`file-like object` for binary reading
53-
of the *resource*.
52+
Returns an opened, :term:`file-like object` for binary reading
53+
of the *resource*.
5454

55-
If the resource cannot be found, :exc:`FileNotFoundError` is
56-
raised.
55+
If the resource cannot be found, :exc:`FileNotFoundError` is
56+
raised.
5757

5858
.. method:: resource_path(resource)
5959
:abstractmethod:
6060

61-
Returns the file system path to the *resource*.
61+
Returns the file system path to the *resource*.
6262

63-
If the resource does not concretely exist on the file system,
64-
raise :exc:`FileNotFoundError`.
63+
If the resource does not concretely exist on the file system,
64+
raise :exc:`FileNotFoundError`.
6565

6666
.. method:: is_resource(name)
6767
:abstractmethod:
6868

69-
Returns ``True`` if the named *name* is considered a resource.
70-
:exc:`FileNotFoundError` is raised if *name* does not exist.
69+
Returns ``True`` if the named *name* is considered a resource.
70+
:exc:`FileNotFoundError` is raised if *name* does not exist.
7171

7272
.. method:: contents()
7373
:abstractmethod:
7474

75-
Returns an :term:`iterable` of strings over the contents of
76-
the package. Do note that it is not required that all names
77-
returned by the iterator be actual resources, e.g. it is
78-
acceptable to return names for which :meth:`is_resource` would
79-
be false.
80-
81-
Allowing non-resource names to be returned is to allow for
82-
situations where how a package and its resources are stored
83-
are known a priori and the non-resource names would be useful.
84-
For instance, returning subdirectory names is allowed so that
85-
when it is known that the package and resources are stored on
86-
the file system then those subdirectory names can be used
87-
directly.
88-
89-
The abstract method returns an iterable of no items.
75+
Returns an :term:`iterable` of strings over the contents of
76+
the package. Do note that it is not required that all names
77+
returned by the iterator be actual resources, e.g. it is
78+
acceptable to return names for which :meth:`is_resource` would
79+
be false.
80+
81+
Allowing non-resource names to be returned is to allow for
82+
situations where how a package and its resources are stored
83+
are known a priori and the non-resource names would be useful.
84+
For instance, returning subdirectory names is allowed so that
85+
when it is known that the package and resources are stored on
86+
the file system then those subdirectory names can be used
87+
directly.
88+
89+
The abstract method returns an iterable of no items.
9090

9191

9292
.. class:: Traversable

Doc/library/signal.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ The variables defined in the :mod:`signal` module are:
211211

212212
.. data:: SIGSTKFLT
213213

214-
Stack fault on coprocessor. The Linux kernel does not raise this signal: it
215-
can only be raised in user space.
214+
Stack fault on coprocessor. The Linux kernel does not raise this signal: it
215+
can only be raised in user space.
216216

217217
.. availability:: Linux.
218218

Doc/library/socket.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,10 @@ Exceptions
342342
Constants
343343
^^^^^^^^^
344344

345-
The AF_* and SOCK_* constants are now :class:`AddressFamily` and
346-
:class:`SocketKind` :class:`.IntEnum` collections.
345+
The AF_* and SOCK_* constants are now :class:`AddressFamily` and
346+
:class:`SocketKind` :class:`.IntEnum` collections.
347347

348-
.. versionadded:: 3.4
348+
.. versionadded:: 3.4
349349

350350
.. data:: AF_UNIX
351351
AF_INET
@@ -669,9 +669,9 @@ Constants
669669
Constant to optimize CPU locality, to be used in conjunction with
670670
:data:`SO_REUSEPORT`.
671671

672-
.. versionadded:: 3.11
672+
.. versionadded:: 3.11
673673

674-
.. availability:: Linux >= 3.9
674+
.. availability:: Linux >= 3.9
675675

676676
.. data:: AF_HYPERV
677677
HV_PROTOCOL_RAW

0 commit comments

Comments
 (0)