We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3604ae1 commit fa73a27Copy full SHA for fa73a27
1 file changed
test/test_errors.py
@@ -2,9 +2,8 @@
2
3
import asyncio
4
import threading
5
-from collections.abc import AsyncIterator
6
from http import HTTPStatus
7
-from typing import NoReturn
+from typing import TYPE_CHECKING, NoReturn
8
9
import pytest
10
from pyqwest import (
@@ -22,7 +21,6 @@
22
21
23
from connectrpc.code import Code
24
from connectrpc.errors import ConnectError
25
-from connectrpc.request import RequestContext
26
27
from .haberdasher_connect import (
28
Haberdasher,
@@ -34,6 +32,11 @@
34
32
)
35
33
from .haberdasher_pb2 import Hat, Size
36
+if TYPE_CHECKING:
+ from collections.abc import AsyncIterator
37
+
38
+ from connectrpc.request import RequestContext
39
40
_errors = [
41
(Code.CANCELED, "Operation was cancelled", 499),
42
(Code.UNKNOWN, "An unknown error occurred", 500),
0 commit comments