8000 [3.12] gh-123492: Remove unnecessary `:func:` parentheses (gh-123493) · mattwang44/cpython@d04de79 · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit d04de79

Browse files
committed
[3.12] pythongh-123492: Remove unnecessary :func: parentheses (pythongh-123493)
1 parent 0181aa2 commit d04de79

Some content is hidden

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

66 files changed

+122
-122
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
@@ -174,7 +174,7 @@ Importing Modules
174174
175175
.. versionadded:: 3.2
176176
.. versionchanged:: 3.3
177-
Uses :func:`!imp.source_from_cache()` in calculating the source path if
177+
Uses :func:`!imp.source_from_cache` in calculating the source path if
178178
only the bytecode path is provided.
179179
.. versionchanged:: 3.12
180180
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
@@ -7,7 +7,7 @@ Enum HOWTO
77
.. currentmodule:: enum
88

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

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

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

170170
>>> from enum import auto
171171
>>> 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
@@ -2171,7 +2171,7 @@ and classes for traversing abstract syntax trees:
21712171
If ``type_comments=True`` is given, the parser is modified to check
21722172
and return type comments as specified by :pep:`484` and :pep:`526`.
21732173
This is equivalent to adding :data:`ast.PyCF_TYPE_COMMENTS` to the
2174-
flags passed to :func:`compile()`. This will report syntax errors
2174+
flags passed to :func:`compile`. This will report syntax errors
21752175
for misplaced type comments. Without this flag, type comments will
21762176
be ignored, and the ``type_comment`` field on selected AST nodes
21772177
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
@@ -89,7 +89,7 @@ Runner context manager
8989
current one. By default :func:`asyncio.new_event_loop` is used and set as
9090
current event loop with :func:`asyncio.set_event_loop` if *loop_factory* is ``None``.
9191

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

9494
async def main():
9595
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.cpu_count()`
93+
If ``0`` is used, then the result of :func:`os.cpu_count`
9494
will be used.
9595

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

0 commit comments

Comments
 (0)
0