Skip to content

Commit cf8f5e5

Browse files
committed
Avoid importing typing
1 parent a8dd667 commit cf8f5e5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/asyncio/graph.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import dataclasses
44
import sys
55
import types
6-
import typing
76

87
from . import events
98
from . import futures
@@ -17,6 +16,9 @@
1716
'FutureCallGraph',
1817
)
1918

19+
if False: # for type checkers
20+
from typing import TextIO
21+
2022
# Sadly, we can't re-use the traceback module's datastructures as those
2123
# are tailored for error reporting, whereas we need to represent an
2224
# async call graph.
@@ -268,7 +270,7 @@ def print_call_graph(
268270
future: futures.Future | None = None,
269271
/,
270272
*,
271-
file: typing.TextIO | None = None,
273+
file: TextIO | None = None,
272274
depth: int = 1,
273275
limit: int | None = None,
274276
) -> None:

0 commit comments

Comments
 (0)