Skip to content

Commit 4b3cb08

Browse files
authored
gh-101100: Fix Sphinx nitpicks in library/inspect.rst and reference/simple_stmts.rst (#113107)
1 parent 1161c14 commit 4b3cb08

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
@@ -245,6 +245,10 @@
245245
# be resolved, as the method is currently undocumented. For context, see
246246
# https://github.com/python/cpython/pull/103289.
247247
('py:meth', '_SubParsersAction.add_parser'),
248+
# Attributes that definitely should be documented better,
249+
# but are deferred for now:
250+
('py:attr', '__annotations__'),
251+
('py:attr', '__wrapped__'),
248252
]
249253

250254
# 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
@@ -59,7 +59,6 @@ Doc/library/http.client.rst
5959
Doc/library/http.cookiejar.rst
6060
Doc/library/http.server.rst
6161
Doc/library/importlib.rst
62-
Doc/library/inspect.rst
6362
Doc/library/locale.rst
6463
Doc/library/logging.config.rst
6564
Doc/library/logging.handlers.rst
@@ -116,7 +115,6 @@ Doc/reference/compound_stmts.rst
116115
Doc/reference/datamodel.rst
117116
Doc/reference/expressions.rst
118117
Doc/reference/import.rst
119-
Doc/reference/simple_stmts.rst
120118
Doc/tutorial/datastructures.rst
121119
Doc/using/windows.rst
122120
Doc/whatsnew/2.0.rst

0 commit comments

Comments
 (0)