10000 [3.13] gh-123517: Remove unnecessary `:meth:` parentheses (gh-123518)… · python/cpython@05dcc81 · GitHub
[go: up one dir, main page]

Skip to content

Commit 05dcc81

Browse files
authored
[3.13] gh-123517: Remove unnecessary :meth: parentheses (gh-123518) (GH-123577)
1 parent 10735bf commit 05dcc81

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

+138
-138
lines changed

Doc/c-api/datetime.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@ Macros for the convenience of modules implementing the DB API:
318318
.. c:function:: PyObject* PyDateTime_FromTimestamp(PyObject *args)
319319
320320
Create and return a new :class:`datetime.datetime` object given an argument
321-
tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp()`.
321+
tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp`.
322322
323323
324324
.. c:function:: PyObject* PyDate_FromTimestamp(PyObject *args)
325325
326326
Create and return a new :class:`datetime.date` object given an argument
327-
tuple suitable for passing to :meth:`datetime.date.fromtimestamp()`.
327+
tuple suitable for passing to :meth:`datetime.date.fromtimestamp`.

Doc/deprecations/pending-removal-in-future.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ although there is currently no date scheduled for their removal.
6767
* Implicit ``None`` on return values.
6868

6969
* :mod:`logging`: the ``warn()`` method has been deprecated
70-
since Python 3.3, use :meth:`~logging.warning()` instead.
70+
since Python 3.3, use :meth:`~logging.warning` instead.
7171

7272
* :mod:`mailbox`: Use of StringIO input and text mode is deprecated, use
7373
BytesIO and binary mode instead.

Doc/extending/newtypes_tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ Further, the attributes can be deleted, setting the C pointers to ``NULL``. Eve
447447
though we can make sure the members are initialized to non-``NULL`` values, the
448448
members can be set to ``NULL`` if the attributes are deleted.
449449

450-
We define a single method, :meth:`!Custom.name()`, that outputs the objects name as the
450+
We define a single method, :meth:`!Custom.name`, that outputs the objects name as the
451451
concatenation of the first and last names. ::
452452

453453
static PyObject *

Doc/faq/programming.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ Not as such.
10131013
For simple input parsing, the easiest approach is usually to split the line into
10141014
whitespace-delimited words using the :meth:`~str.split` method of string objects
10151015
and then convert decimal strings to numeric values using :func:`int` or
1016-
:func:`float`. :meth:`!split()` supports an optional "sep" parameter which is useful
1016+
:func:`float`. :meth:`!split` supports an optional "sep" parameter which is useful
10171017
if the line uses something other than whitespace as a separator.
10181018

10191019
For more complicated input parsing, regular expressions are more powerful

Doc/howto/descriptor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ The full C implementation can be found in :c:func:`!super_getattro` in
803803
Summary of invocation logic
804804
---------------------------
805805

806-
The mechanism for descriptors is embedded in the :meth:`__getattribute__()`
806+
The mechanism for descriptors is embedded in the :meth:`__getattribute__`
807807
methods for :class:`object`, :class:`type`, and :func:`super`.
808808

809809
The important points to remember are:

Doc/library/asyncio-eventloop.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Running and stopping the loop
126126

127127
Run the event loop until :meth:`stop` is called.
128128

129-
If :meth:`stop` is called before :meth:`run_forever()` is called,
129+
If :meth:`stop` is called before :meth:`run_forever` is called,
130130
the loop will poll the I/O selector once with a timeout of zero,
131131
run all callbacks scheduled in response to I/O events (and
132132
those that were already scheduled), and then exit.
@@ -165,7 +165,7 @@ Running and stopping the loop
165165
.. coroutinemethod:: loop.shutdown_asyncgens()
166166

167167
Schedule all currently open :term:`asynchronous generator` objects to
168-
close with an :meth:`~agen.aclose()` call. After calling this method,
168+
close with an :meth:`~agen.aclose` call. After calling this method,
169169
the event loop will issue a warning if a new asynchronous generator
170170
is iterated. This should be used to reliably finalize all scheduled
171171
asynchronous generators.
@@ -1402,7 +1402,7 @@ Allows customizing how exceptions are handled in the event loop.
14021402

14031403
This method should not be overloaded in subclassed
14041404
event loops. For custom exception handling, use
1405-
the :meth:`set_exception_handler()` method.
1405+
the :meth:`set_exception_handler` method.
14061406

14071407
Enabling debug mode
14081408
^^^^^^^^^^^^^^^^^^^
@@ -1485,7 +1485,7 @@ async/await code consider using the high-level
14851485
* *stdin* can be any of these:
14861486

14871487
* a file-like object
1488-
* an existing file descriptor (a positive integer), for example those created with :meth:`os.pipe()`
1488+
* an existing file descriptor (a positive integer), for example those created with :meth:`os.pipe`
14891489
* the :const:`subprocess.PIPE` constant (default) which will create a new
14901490
pipe and connect it,
14911491
* the value ``None`` which will make the subprocess inherit the file

Doc/library/asyncio-llapi-index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ See also the main documentation section about the
5656
* - :meth:`loop.close`
5757
- Close the event loop.
5858

59-
* - :meth:`loop.is_running()`
59+
* - :meth:`loop.is_running`
6060
- Return ``True`` if the event loop is running.
6161

62-
* - :meth:`loop.is_closed()`
62+
* - :meth:`loop.is_closed`
6363
- Return ``True`` if the event loop is closed.
6464

6565
* - ``await`` :meth:`loop.shutdown_asyncgens`

Doc/library/asyncio-queue.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Queue
5555
Return ``True`` if there are :attr:`maxsize` items in the queue.
5656

5757
If the queue was initialized with ``maxsize=0`` (the default),
58-
then :meth:`full()` never returns ``True``.
58+
then :meth:`full` never returns ``True``.
5959

6060
.. coroutinemethod:: get()
6161

Doc/library/configparser.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ ConfigParser Objects
986986
When *converters* is given, it should be a dictionary where each key
987987
represents the name of a type converter and each value is a callable
988988
implementing the conversion from string to the desired datatype. Every
989-
converter gets its own corresponding :meth:`!get*()` method on the parser
989+
converter gets its own corresponding :meth:`!get*` method on the parser
990990
object and section proxies.
991991

992992
It is possible to read several configurations into a single
@@ -1026,7 +1026,7 @@ ConfigParser Objects
10261026
The *converters* argument was added.
10271027

10281028
.. versionchanged:: 3.7
1029-
The *defaults* argument is read with :meth:`read_dict()`,
1029+
The *defaults* argument is read with :meth:`read_dict`,
10301030
providing consistent behavior across the parser: non-string
10311031
keys and values are implicitly converted to strings.
10321032

Doc/library/dataclasses.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Module contents
124124
- *unsafe_hash*: If ``False`` (the default), a :meth:`~object.__hash__` method
125125
is generated according to how *eq* and *frozen* are set.
126126

127-
:meth:`!__hash__` is used by built-in :meth:`hash()`, and when objects are
127+
:meth:`!__hash__` is used by built-in :meth:`hash`, and when objects are
128128
added to hashed collections such as dictionaries and sets. Having a
129129
:meth:`!__hash__` implies that instances of the class are immutable.
130130
Mutability is a complicated property that depends on the programmer's

0 commit comments

Comments
 (0)
0