|
2 | 2 |
|
3 | 3 | import sys |
4 | 4 | from collections.abc import Iterator |
5 | | -from typing import TYPE_CHECKING |
6 | | -from typing import Any |
| 5 | +from typing import Any, Literal |
7 | 6 |
|
8 | 7 | from upath._chain import DEFAULT_CHAIN_PARSER |
9 | 8 | from upath._flavour import upath_strip_protocol |
10 | 9 | from upath.core import UPath |
11 | 10 | from upath.types import JoinablePathLike |
12 | 11 |
|
13 | | -if TYPE_CHECKING: |
14 | | - from typing import Literal |
15 | | - |
16 | | - if sys.version_info >= (3, 11): |
17 | | - from typing import Self |
18 | | - from typing import Unpack |
19 | | - else: |
20 | | - from typing_extensions import Self |
21 | | - from typing_extensions import Unpack |
22 | | - |
23 | | - from upath._chain import FSSpecChainParser |
24 | | - from upath.types.storage_options import AzureStorageOptions |
25 | | - from upath.types.storage_options import GCSStorageOptions |
26 | | - from upath.types.storage_options import HfStorageOptions |
27 | | - from upath.types.storage_options import S3StorageOptions |
| 12 | + |
| 13 | +if sys.version_info >= (3, 11): |
| 14 | + from typing import Self |
| 15 | + from typing import Unpack |
| 16 | +else: |
| 17 | + from typing_extensions import Self |
| 18 | + from typing_extensions import Unpack |
| 19 | + |
| 20 | +from upath._chain import FSSpecChainParser |
| 21 | +from upath.types.storage_options import AzureStorageOptions |
| 22 | +from upath.types.storage_options import GCSStorageOptions |
| 23 | +from upath.types.storage_options import HfStorageOptions |
| 24 | +from upath.types.storage_options import S3StorageOptions |
28 | 25 |
|
29 | 26 | __all__ = [ |
30 | 27 | "CloudPath", |
|
0 commit comments