8000 [3.12] gh-101100: Sphinx warnings: pick the low hanging fruits (GH-10… · serhiy-storchaka/cpython@c1f69ba · GitHub 8000
[go: up one dir, main page]

Skip to content

Commit c1f69ba

Browse files
[3.12] pythongh-101100: Sphinx warnings: pick the low hanging fruits (pythonGH-107386).
(cherry picked from commit f2d07d3) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent 80aebd5 commit c1f69ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+125
-139
lines changed

Doc/c-api/bool.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ creation and deletion functions don't apply to booleans. The following macros
1111
are available, however.
1212

1313

14+
.. c:var:: PyTypeObject PyBool_Type
15+
16+
This instance of :c:type:`PyTypeObject` represents the Python boolean type; it
17+
is the same object as :class:`bool` in the Python layer.
18+
19+
1420
.. c:function:: int PyBool_Check(PyObject *o)
1521
1622
Return true if *o* is of type :c:data:`PyBool_Type`. This function always

Doc/faq/extending.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ How do I extract C values from a Python object?
8181

8282
That depends on the object's type. If it's a tuple, :c:func:`PyTuple_Size`
8383
returns its length and :c:func:`PyTuple_GetItem` returns the item at a specified
84-
index. Lists have similar functions, :c:func:`PyListSize` and
84+
index. Lists have similar functions, :c:func:`PyList_Size` and
8585
:c:func:`PyList_GetItem`.
8686

8787
For bytes, :c:func:`PyBytes_Size` returns its length and
8888
:c:func:`PyBytes_AsStringAndSize` provides a pointer to its value and its
8989
length. Note that Python bytes objects may contain null bytes so C's
90-
:c:func:`strlen` should not be used.
90+
:c:func:`!strlen` should not be used.
9191

9292
To test the type of an object, first make sure it isn't ``NULL``, and then use
9393
:c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:func:`PyList_Check`, etc.

Doc/howto/curses.rst

-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ If you're in doubt about the detailed behavior of the curses
527527
functions, consult the manual pages for your curses implementation,
528528
whether it's ncurses or a proprietary Unix vendor's. The manual pages
529529
will document any quirks, and provide complete lists of all the
530-
functions, attributes, and :const:`ACS_\*` characters available to
530+
functions, attributes, and :ref:`ACS_\* <curses-acs-codes>` characters available to
531531
you.
532532

533533
Because the curses API is so large, some functions aren't supported in

Doc/install/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ Notes:
778778

779779
(2)
780780
On Unix, if the :envvar:`HOME` environment variable is not defined, the user's
781-
home directory will be determined with the :func:`getpwuid` function from the
781+
home directory will be determined with the :func:`~pwd.getpwuid` function from the
782782
standard :mod:`pwd` module. This is done by the :func:`os.path.expanduser`
783783
function used by Distutils.
784784

Doc/library/asyncio-extending.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Task lifetime support
6969
=====================
7070

7171
A third party task implementation should call the following functions to keep a task
72-
visible by :func:`asyncio.get_tasks` and :func:`asyncio.current_task`:
72+
visible by :func:`asyncio.all_tasks` and :func:`asyncio.current_task`:
7373

7474
.. function:: _register_task(task)
7575

Doc/library/asyncio-future.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,4 +276,4 @@ the Future has a result::
276276
:func:`concurrent.futures.as_completed` functions.
277277

278278
- :meth:`asyncio.Future.cancel` accepts an optional ``msg`` argument,
279-
but :func:`concurrent.futures.cancel` does not.
279+
but :meth:`concurrent.futures.Future.cancel` does not.

Doc/library/bz2.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ The :mod:`bz2` module contains:
8787
compressed streams.
8888

8989
:class:`BZ2File` provides all of the members specified by the
90-
:class:`io.BufferedIOBase`, except for :meth:`detach` and :meth:`truncate`.
90+
:class:`io.BufferedIOBase`, except for :meth:`~io.BufferedIOBase.detach`
91+
and :meth:`~io.IOBase.truncate`.
9192
Iteration and the :keyword:`with` statement are supported.
9293

9394
:class:`BZ2File` also provides the following method:

Doc/library/code.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,12 @@ interpreter objects as well as the following additions.
163163

164164
Push a line of source text to the interpreter. The line should not have a
165165
trailing newline; it may have internal newlines. The line is appended to a
166-
buffer and the interpreter's :meth:`runsource` method is called with the
166+
buffer and the interpreter's :meth:`~InteractiveInterpreter.runsource` method is called with the
167167
concatenated contents of the buffer as source. If this indicates that the
168168
command was executed or invalid, the buffer is reset; otherwise, the command is
169169
incomplete, and the buffer is left as it was after the line was appended. The
170170
return value is ``True`` if more input is required, ``False`` if the line was
171-
dealt with in some way (this is the same as :meth:`runsource`).
171+
dealt with in some way (this is the same as :meth:`!runsource`).
172172

173173

174174
.. method:: InteractiveConsole.resetbuffer()

Doc/library/concurrent.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
The :mod:`concurrent` package
2-
=============================
1+
The :mod:`!concurrent` package
2+
==============================
33

44
Currently, there is only one module in this package:
55

Doc/library/curses.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,6 +1648,8 @@ keys); also, the following keypad mappings are standard:
16481648
| :kbd:`Page Down` | KEY_NPAGE |
16491649
+------------------+-----------+
16501650

1651+
.. _curses-acs-codes:
1652+
16511653
The following table lists characters from the alternate character set. These are
16521654
inherited from the VT100 terminal, and will generally be available on software
16531655
emulations such as X terminals. When there is no graphic available, curses

0 commit comments

Comments
 (0)
0