Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Lib/asyncio/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
)

if False: # for type checkers
from typing import TextIO
from io import Writer

# Sadly, we can't re-use the traceback module's datastructures as those
# are tailored for error reporting, whereas we need to represent an
Expand Down Expand Up @@ -270,7 +270,7 @@ def print_call_graph(
future: futures.Future | None = None,
/,
*,
file: TextIO | None = None,
file: Writer[str] | None = None,
depth: int = 1,
limit: int | None = None,
) -> None:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Use protocol :class:`io.Writer` as annotation for
:func:`asyncio.format_call_graph`'s ``file`` parameter instead of
:class:`typing.TextIO`.
Loading