8000 [3.12] Fix patchcheck for `asyncio.tasks` (GH-108159) (#108160) · python/cpython@1e46f1a · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e46f1a

Browse files
[3.12] Fix patchcheck for asyncio.tasks (GH-108159) (#108160)
Fix patchcheck for `asyncio.tasks` (GH-108159) (cherry picked from commit b1e5d2c) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
1 parent a4a494a commit 1e46f1a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Lib/asyncio/tasks.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -944,21 +944,21 @@ def callback():
944944
def create_eager_task_factory(custom_task_constructor):
945945
"""Create a function suitable for use as a task factory on an event-loop.
946946
947-
Example usage:
947+
Example usage:
948948
949-
loop.set_task_factory(
950-
asyncio.create_eager_task_factory(my_task_constructor))
949+
loop.set_task_factory(
950+
asyncio.create_eager_task_factory(my_task_constructor))
951951
952-
Now, tasks created will be started immediately (rather than being first
953-
scheduled to an event loop). The constructor argument can be any callable
954-
that returns a Task-compatible object and has a signature compatible
955-
with `Task.__init__`; it must have the `eager_start` keyword argument.
952+
Now, tasks created will be started immediately (rather than being first
953+
scheduled to an event loop). The constructor argument can be any callable
954+
that returns a Task-compatible object and has a signature compatible
955+
with `Task.__init__`; it must have the `eager_start` keyword argument.
956956
957-
Most applications will use `Task` for `custom_task_constructor` and in
957+
Most applications will use `Task` for `custom_task_constructor` and in
958958
this case there's no need to call `create_eager_task_factory()`
959959
directly. Instead the global `eager_task_factory` instance can be
960960
used. E.g. `loop.set_task_factory(asyncio.eager_task_factory)`.
961-
"""
961+
"""
962962

963963
def factory(loop, coro, *, name=None, context=None):
964964
return custom_task_constructor(

0 commit comments

Comments
 (0)
0