|
3 | 3 | # |
4 | 4 |
|
5 | 5 | from logging import Logger |
6 | | -from typing import TYPE_CHECKING, Any, Callable, Iterable, List, Mapping, Optional, Union |
7 | | - |
8 | | -if TYPE_CHECKING: |
9 | | - from airbyte_cdk.sources.declarative.partition_routers.partition_router import PartitionRouter |
| 6 | +from typing import Any, Callable, Iterable, List, Mapping, Optional, Union |
10 | 7 |
|
11 | 8 | from airbyte_cdk.models import AirbyteStream, SyncMode |
| 9 | +from airbyte_cdk.sources.declarative.incremental.concurrent_partition_cursor import ( |
| 10 | + ConcurrentPerPartitionCursor, |
| 11 | +) |
| 12 | +from airbyte_cdk.sources.declarative.partition_routers.partition_router import PartitionRouter |
| 13 | +from airbyte_cdk.sources.declarative.stream_slicers.declarative_partition_generator import ( |
| 14 | + StreamSlicerPartitionGenerator, |
| 15 | +) |
12 | 16 | from airbyte_cdk.sources.streams.concurrent.abstract_stream import AbstractStream |
13 | 17 | from airbyte_cdk.sources.streams.concurrent.availability_strategy import StreamAvailability |
14 | 18 | from airbyte_cdk.sources.streams.concurrent.cursor import Cursor, CursorField |
@@ -108,15 +112,8 @@ def block_simultaneous_read(self) -> str: |
108 | 112 | def block_simultaneous_read(self, value: str) -> None: |
109 | 113 | self._block_simultaneous_read = value |
110 | 114 |
|
111 | | - def get_partition_router(self) -> "PartitionRouter | None": |
| 115 | + def get_partition_router(self) -> PartitionRouter | None: |
112 | 116 | """Return the partition router for this stream, or None if not available.""" |
113 | | - from airbyte_cdk.sources.declarative.incremental.concurrent_partition_cursor import ( |
114 | | - ConcurrentPerPartitionCursor, |
115 | | - ) |
116 | | - from airbyte_cdk.sources.declarative.stream_slicers.declarative_partition_generator import ( |
117 | | - StreamSlicerPartitionGenerator, |
118 | | - ) |
119 | | - |
120 | 117 | if not isinstance(self._stream_partition_generator, StreamSlicerPartitionGenerator): |
121 | 118 | return None |
122 | 119 | stream_slicer = self._stream_partition_generator._stream_slicer |
|
0 commit comments