Skip to content

Commit 1bbc3ce

Browse files
Fix old matplotlib missing types
1 parent bd9c637 commit 1bbc3ce

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/benchmark/client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
import os
33
import time
44
from contextlib import contextmanager
5-
from typing import Any, Coroutine, Iterator
5+
from typing import Any, Coroutine, Iterator, List
66

77
import aiohttp
8-
import matplotlib.pyplot as plt
8+
import matplotlib.pyplot as plt # type: ignore[import-untyped]
99
import pyinstrument
10-
from matplotlib.axes import Axes
10+
from matplotlib.axes import Axes # type: ignore[import-untyped]
1111

1212
import httpcore
1313

@@ -49,15 +49,15 @@ async def coro_with_sem(coro: Coroutine[Any, Any, Any]) -> None:
4949

5050
async 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

Comments
 (0)