We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98ef483 commit 507715dCopy full SHA for 507715d
Lib/asyncio/graph.py
@@ -1,6 +1,7 @@
1
"""Introspection utils for tasks call graphs."""
2
3
import dataclasses
4
+import io
5
import sys
6
import types
7
@@ -16,9 +17,6 @@
16
17
'FutureCallGraph',
18
)
19
-if False: # for type checkers
20
- from typing import TextIO
21
-
22
# Sadly, we can't re-use the traceback module's datastructures as those
23
# are tailored for error reporting, whereas we need to represent an
24
# async call graph.
@@ -270,7 +268,7 @@ def print_call_graph(
270
268
future: futures.Future | None = None,
271
269
/,
272
*,
273
- file: TextIO | None = None,
+ file: io.Writer[str] | None = None,
274
depth: int = 1,
275
limit: int | None = None,
276
) -> None:
0 commit comments