Skip to content

Commit 3b7b256

Browse files
[3.11] gh-101100: Fix Sphinx nitpicks in library/inspect.rst and reference/simple_stmts.rst (GH-113107) (#113110)
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 <Alex.Waygood@Gmail.com>
1 parent d423493 commit 3b7b256

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
@@ -231,6 +231,10 @@
231231
# be resolved, as the method is currently undocumented. For context, see
232232
# https://github.com/python/cpython/pull/103289.
233233
('py:meth', '_SubParsersAction.add_parser'),
234+
# Attributes that definitely should be documented better,
235+
# but are deferred for now:
236+
('py:attr', '__annotations__'),
237+
('py:attr', '__wrapped__'),
234238
]
235239

236240
# 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
@@ -213,7 +213,7 @@ Assignment of an object to a single target is recursively defined as follows.
213213
object. This can either replace an existing key/value pair with the same key
214214
value, or insert a new key/value pair (if no key with the same value existed).
215215

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

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

355355
.. seealso::
356356

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

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

Doc/tools/.nitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ Doc/library/http.client.rst
6262
Doc/library/http.cookiejar.rst
6363
Doc/library/http.server.rst
6464
Doc/library/importlib.rst
65-
Doc/library/inspect.rst
6665
Doc/library/locale.rst
6766
Doc/library/logging.config.rst
6867
Doc/library/logging.handlers.rst
@@ -120,7 +119,6 @@ Doc/reference/compound_stmts.rst
120119
Doc/reference/datamodel.rst
121120
Doc/reference/expressions.rst
122121
Doc/reference/import.rst
123-
Doc/reference/simple_stmts.rst
124122
Doc/tutorial/datastructures.rst
125123
Doc/using/windows.rst
126124
Doc/whatsnew/2.0.rst

0 commit comments

Comments
 (0)