Skip to content

Commit dc568dd

Browse files
[3.12] gh-101100: Fix Sphinx nitpicks in library/inspect.rst and reference/simple_stmts.rst (GH-113107) (#113109)
gh-101100: Fix Sphinx nitpicks in `library/inspect.rst` and `reference/simple_stmts.rst` (GH-113107) (cherry picked from commit 4b3cb08) Co-authored-by: Alex Waygood <[email protected]>
1 parent 59a22d3 commit dc568dd

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

Doc/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@
239239
# be resolved, as the method is currently undocumented. For context, see
240240
# https://github.com/python/cpython/pull/103289.
241241
('py:meth', '_SubParsersAction.add_parser'),
242+
# Attributes that definitely should be documented better,
243+
# but are deferred for now:
244+
('py:attr', '__annotations__'),
245+
('py:attr', '__wrapped__'),
242246
]
243247

244248
# gh-106948: Copy standard C types declared in the "c:type" domain to the

Doc/reference/simple_stmts.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ Assignment of an object to a single target is recursively defined as follows.
214214
object. This can either replace an existing key/value pair with the same key
215215
value, or insert a new key/value pair (if no key with the same value existed).
216216

217-
For user-defined objects, the :meth:`__setitem__` method is called with
217+
For user-defined objects, the :meth:`~object.__setitem__` method is called with
218218
appropriate arguments.
219219

220220
.. index:: pair: slicing; assignment
@@ -351,7 +351,7 @@ If the right hand side is present, an annotated
351351
assignment performs the actual assignment before evaluating annotations
352352
(where applicable). If the right hand side is not present for an expression
353353
target, then the interpreter evaluates the target except for the last
354-
:meth:`__setitem__` or :meth:`__setattr__` call.
354+
:meth:`~object.__setitem__` or :meth:`~object.__setattr__` call.
355355

356356
.. seealso::
357357

@@ -932,7 +932,7 @@ That is not a future statement; it's an ordinary import statement with no
932932
special semantics or syntax restrictions.
933933

934934
Code compiled by calls to the built-in functions :func:`exec` and :func:`compile`
935-
that occur in a module :mod:`M` containing a future statement will, by default,
935+
that occur in a module :mod:`!M` containing a future statement will, by default,
936936
use the new syntax or semantics associated with the future statement. This can
937937
be controlled by optional arguments to :func:`compile` --- see the documentation
938938
of that function for details.

Doc/tools/.nitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ Doc/library/http.client.rst
6767
Doc/library/http.cookiejar.rst
6868
Doc/library/http.server.rst
6969
Doc/library/importlib.rst
70-
Doc/library/inspect.rst
7170
Doc/library/locale.rst
7271
Doc/library/logging.config.rst
7372
Doc/library/logging.handlers.rst
@@ -133,7 +132,6 @@ Doc/reference/compound_stmts.rst
133132
Doc/reference/datamodel.rst
134133
Doc/reference/expressions.rst
135134
Doc/reference/import.rst
136-
Doc/reference/simple_stmts.rst
137135
Doc/tutorial/datastructures.rst
138136
Doc/using/windows.rst
139137
Doc/whatsnew/2.0.rst

0 commit comments

Comments
 (0)