|
1 | | -from .client import Client, AsyncClient |
2 | | -from .v2.client import V2Client, AsyncV2Client |
3 | | -import typing |
4 | | -from .environment import ClientEnvironment |
5 | 1 | import os |
6 | | -import httpx |
| 2 | +import typing |
7 | 3 | from concurrent.futures import ThreadPoolExecutor |
8 | 4 |
|
| 5 | +import httpx |
| 6 | +from .client import AsyncClient, Client |
| 7 | +from .environment import ClientEnvironment |
| 8 | +from .v2.client import AsyncRawV2Client, AsyncV2Client, RawV2Client, V2Client |
| 9 | + |
9 | 10 |
|
10 | 11 | class _CombinedRawClient: |
11 | 12 | """Proxy that combines v1 and v2 raw clients. |
@@ -57,7 +58,7 @@ def __init__( |
57 | 58 | self, |
58 | 59 | client_wrapper=self._client_wrapper |
59 | 60 | ) |
60 | | - self._raw_client = _CombinedRawClient(v1_raw, self._raw_client) |
| 61 | + self._raw_client = typing.cast(RawV2Client, _CombinedRawClient(v1_raw, self._raw_client)) |
61 | 62 |
|
62 | 63 |
|
63 | 64 | class AsyncClientV2(AsyncV2Client, AsyncClient): # type: ignore |
@@ -90,4 +91,4 @@ def __init__( |
90 | 91 | self, |
91 | 92 | client_wrapper=self._client_wrapper |
92 | 93 | ) |
93 | | - self._raw_client = _CombinedRawClient(v1_raw, self._raw_client) |
| 94 | + self._raw_client = typing.cast(AsyncRawV2Client, _CombinedRawClient(v1_raw, self._raw_client)) |
0 commit comments