Skip to content

Commit d47d7e1

Browse files
authored
[3.12] gh-123517: Remove unnecessary :meth: parentheses (gh-123518) (GH-123576)
1 parent 95b073b commit d47d7e1

Some content is hidden

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

50 files changed

+135
-135
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/extending/newtypes_tutorial.rst

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

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

455455
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.
@@ -1386,7 +1386,7 @@ Allows customizing how exceptions are handled in the event loop.
13861386

13871387
This method should not be overloaded in subclassed
13881388
event loops. For custom exception handling, use
1389-
the :meth:`set_exception_handler()` method.
1389+
the :meth:`set_exception_handler` method.
13901390

13911391
Enabling debug mode
13921392
^^^^^^^^^^^^^^^^^^^
@@ -1469,7 +1469,7 @@ async/await code consider using the high-level
14691469
* *stdin* can be any of these:
14701470

14711471
* a file-like object
1472-
* an existing file descriptor (a positive integer), for example those created with :meth:`os.pipe()`
1472+
* an existing file descriptor (a positive integer), for example those created with :meth:`os.pipe`
14731473
* the :const:`subprocess.PIPE` constant (default) which will create a new
14741474
pipe and connect it,
14751475
* 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
@@ -960,7 +960,7 @@ ConfigParser Objects
960960
When *converters* is given, it should be a dictionary where each key
961961
represents the name of a type converter and each value is a callable
962962
implementing the conversion from string to the desired datatype. Every
963-
converter gets its own corresponding :meth:`!get*()` method on the parser
963+
converter gets its own corresponding :meth:`!get*` method on the parser
964964
object and section proxies.
965965

966966
It is possible to read several configurations into a single
@@ -1000,7 +1000,7 @@ ConfigParser Objects
10001000
The *converters* argument was added.
10011001

10021002
.. versionchanged:: 3.7
1003-
The *defaults* argument is read with :meth:`read_dict()`,
1003+
The *defaults* argument is read with :meth:`read_dict`,
10041004
providing consistent behavior across the parser: non-string
10051005
keys and values are implicitly converted to strings.
10061006

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

Doc/library/datetime.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ Other constructors, all class methods:
10341034
.. versionadded:: 3.7
10351035
.. versionchanged:: 3.11
10361036
Previously, this method only supported formats that could be emitted by
1037-
:meth:`date.isoformat()` or :meth:`datetime.isoformat()`.
1037+
:meth:`date.isoformat` or :meth:`datetime.isoformat`.
10381038

10391039

10401040
.. classmethod:: datetime.fromisocalendar(year, week, day)
@@ -1817,7 +1817,7 @@ Other constructor:
18171817
.. versionadded:: 3.7
18181818
.. versionchanged:: 3.11
18191819
Previously, this method only supported formats that could be emitted by
1820-
:meth:`time.isoformat()`.
1820+
:meth:`time.isoformat`.
18211821

18221822

18231823
Instance methods:

0 commit comments

Comments
 (0)