Skip to content

Commit 9f5f2b7

Browse files
authored
[3.13] gh-123492: Remove unnecessary :func: parentheses (gh-123493) (#123513)
1 parent 8ef277e commit 9f5f2b7

Some content is hidden

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

75 files changed

+151
-151
lines changed

Doc/c-api/exceptions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ propagated, additional calls into the Python/C API may not behave as intended
3434
and may fail in mysterious ways.
3535

3636
.. note::
37-
The error indicator is **not** the result of :func:`sys.exc_info()`.
37+
The error indicator is **not** the result of :func:`sys.exc_info`.
3838
The former corresponds to an exception that is not yet caught (and is
3939
therefore still propagating), while the latter returns an exception after
4040
it is caught (and has therefore stopped propagating).

Doc/c-api/import.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Importing Modules
190190
191191
.. versionadded:: 3.2
192192
.. versionchanged:: 3.3
193-
Uses :func:`!imp.source_from_cache()` in calculating the source path if
193+
Uses :func:`!imp.source_from_cache` in calculating the source path if
194194
only the bytecode path is provided.
195195
.. versionchanged:: 3.12
196196
No longer uses the removed :mod:`!imp` module.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ APIs:
4848
* ``read_binary()``
4949
* ``read_text()``
5050

51-
Use :func:`importlib.resources.files()` instead. Refer to `importlib-resources: Migrating from Legacy
51+
Use :func:`importlib.resources.files` instead. Refer to `importlib-resources: Migrating from Legacy
5252
<https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy>`_ (:gh:`106531`)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Pending Removal in Python 3.15
99
* :class:`locale`: :func:`locale.getdefaultlocale` was deprecated in Python 3.11
1010
and originally planned for removal in Python 3.13 (:gh:`90817`),
1111
but removal has been postponed to Python 3.15.
12-
Use :func:`locale.setlocale()`, :func:`locale.getencoding()` and
13-
:func:`locale.getlocale()` instead.
12+
Use :func:`locale.setlocale`, :func:`locale.getencoding` and
13+
:func:`locale.getlocale` instead.
1414
(Contributed by Hugo van Kemenade in :gh:`111187`.)
1515

1616
* :mod:`pathlib`:

Doc/howto/descriptor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ were defined.
513513

514514
Descriptors are a powerful, general purpose protocol. They are the mechanism
515515
behind properties, methods, static methods, class methods, and
516-
:func:`super()`. They are used throughout Python itself. Descriptors
516+
:func:`super`. They are used throughout Python itself. Descriptors
517517
simplify the underlying C code and offer a flexible set of new tools for
518518
everyday Python programs.
519519

Doc/howto/enum.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Enum HOWTO
99
.. currentmodule:: enum
1010

1111
An :class:`Enum` is a set of symbolic names bound to unique values. They are
12-
similar to global variables, but they offer a more useful :func:`repr()`,
12+
similar to global variables, but they offer a more useful :func:`repr`,
1313
grouping, type-safety, and a few other features.
1414

1515
They are most useful when you have a variable that can take one of a limited
@@ -167,7 +167,7 @@ And a function to display the chores for a given day::
167167
answer SO questions
168168

169169
In cases where the actual values of the members do not matter, you can save
170-
yourself some work and use :func:`auto()` for the values::
170+
yourself some work and use :func:`auto` for the values::
171171

172172
>>> from enum import auto
173173
>>> class Weekday(Flag):

Doc/howto/instrumentation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ Available static markers
307307
.. object:: gc__start(int generation)
308308

309309
Fires when the Python interpreter starts a garbage collection cycle.
310-
``arg0`` is the generation to scan, like :func:`gc.collect()`.
310+
``arg0`` is the generation to scan, like :func:`gc.collect`.
311311

312312
.. object:: gc__done(long collected)
313313

Doc/library/ast.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2134,7 +2134,7 @@ and classes for traversing abstract syntax trees:
21342134
If ``type_comments=True`` is given, the parser is modified to check
21352135
and return type comments as specified by :pep:`484` and :pep:`526`.
21362136
This is equivalent to adding :data:`ast.PyCF_TYPE_COMMENTS` to the
2137-
flags passed to :func:`compile()`. This will report syntax errors
2137+
flags passed to :func:`compile`. This will report syntax errors
21382138
for misplaced type comments. Without this flag, type comments will
21392139
be ignored, and the ``type_comment`` field on selected AST nodes
21402140
will always be ``None``. In addition, the locations of ``# type:

Doc/library/asyncio-runner.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Runner context manager
9191
current one. By default :func:`asyncio.new_event_loop` is used and set as
9292
current event loop with :func:`asyncio.set_event_loop` if *loop_factory* is ``None``.
9393

94-
Basically, :func:`asyncio.run()` example can be rewritten with the runner usage::
94+
Basically, :func:`asyncio.run` example can be rewritten with the runner usage::
9595

9696
async def main():
9797
await asyncio.sleep(1)

Doc/library/compileall.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ compile Python sources.
9090
.. option:: -j N
9191

9292
Use *N* workers to compile the files within the given directory.
93-
If ``0`` is used, then the result of :func:`os.process_cpu_count()`
93+
If ``0`` is used, then the result of :func:`os.process_cpu_count`
9494
will be used.
9595

9696
.. option:: --invalidation-mode [timestamp|checked-hash|unchecked-hash]

0 commit comments

Comments
 (0)