22import os
33import time
44from contextlib import contextmanager
5- from typing import Any , Coroutine , Iterator
5+ from typing import Any , Coroutine , Iterator , List
66
77import aiohttp
8- import matplotlib .pyplot as plt
8+ import matplotlib .pyplot as plt # type: ignore[import-untyped]
99import pyinstrument
10- from matplotlib .axes import Axes
10+ from matplotlib .axes import Axes # type: ignore[import-untyped]
1111
1212import httpcore
1313
@@ -49,15 +49,15 @@ async def coro_with_sem(coro: Coroutine[Any, Any, Any]) -> None:
4949
5050async def run_requests (axis : Axes ) -> None :
5151 async def httpcore_get (
52- pool : httpcore .AsyncConnectionPool , timings : list [int ]
52+ pool : httpcore .AsyncConnectionPool , timings : List [int ]
5353 ) -> None :
5454 start = time .monotonic ()
5555 res = await pool .request ("GET" , URL )
5656 assert len (await res .aread ()) == 2000
5757 assert res .status == 200 , f"status_code={ res .status } "
5858 timings .append (duration (start ))
5959
60- async def aiohttp_get (session : aiohttp .ClientSession , timings : list [int ]) -> None :
60+ async def aiohttp_get (session : aiohttp .ClientSession , timings : List [int ]) -> None :
6161 start = time .monotonic ()
6262 async with session .request ("GET" , URL ) as res :
6363 assert len (await res .read ()) == 2000
@@ -70,7 +70,7 @@ async def aiohttp_get(session: aiohttp.ClientSession, timings: list[int]) -> Non
7070 (httpcore_get (pool , []) for _ in range (REQUESTS )), CONCURRENCY * 2
7171 )
7272
73- timings : list [int ] = []
73+ timings : List [int ] = []
7474 start = time .monotonic ()
7575 with profile ():
7676 for _ in range (REPEATS ):
0 commit comments