From 7cff9454e6dfc7f166f4d978d0b70d9b6e635446 Mon Sep 17 00:00:00 2001 From: igorcoding Date: Fri, 11 Oct 2024 16:58:24 +0300 Subject: [PATCH] fix typing.assert_type --- tests/exthttp/test_abstract.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/exthttp/test_abstract.py b/tests/exthttp/test_abstract.py index 6058799..d7339cd 100644 --- a/tests/exthttp/test_abstract.py +++ b/tests/exthttp/test_abstract.py @@ -1,11 +1,17 @@ -from typing import Any, assert_type +from typing import Any import pytest from multidict import CIMultiDict +from extapi._meta import PY311 from extapi.http.abc import AbstractExecutor, Addon from extapi.http.types import RequestData, Response +if PY311: + from typing import assert_type # type: ignore[attr-defined] +else: + from typing_extensions import assert_type + class TestAbstractExecutor: @pytest.mark.parametrize("method", ["get", "post", "put", "patch", "delete"])