Skip to content

Commit 393a23e

Browse files
author
maxime.c
committed
lint
1 parent c7c63a7 commit 393a23e

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

airbyte_cdk/sources/declarative/extractors/record_filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from dataclasses import InitVar, dataclass
55
from typing import Any, Iterable, Mapping, Optional, Union
66

7-
from airbyte_cdk.sources.streams.concurrent.cursor import Cursor
87
from airbyte_cdk.sources.declarative.interpolation.interpolated_boolean import InterpolatedBoolean
8+
from airbyte_cdk.sources.streams.concurrent.cursor import Cursor
99
from airbyte_cdk.sources.types import Config, Record, StreamSlice, StreamState
1010

1111

airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,7 +2180,7 @@ def _build_concurrent_cursor(
21802180
config: Config,
21812181
) -> Optional[StreamSlicer]:
21822182
stream_state = self._connector_state_manager.get_stream_state(
2183-
stream_name=model.name, namespace=None
2183+
stream_name=model.name or "", namespace=None
21842184
)
21852185

21862186
if model.incremental_sync and stream_slicer:
@@ -2195,12 +2195,11 @@ def _build_concurrent_cursor(
21952195
else:
21962196
state_transformations = []
21972197

2198-
return self.create_concurrent_cursor_from_perpartition_cursor(
2199-
# type: ignore # This is a known issue that we are creating and returning a ConcurrentCursor which does not technically implement the (low-code) StreamSlicer. However, (low-code) StreamSlicer and ConcurrentCursor both implement StreamSlicer.stream_slices() which is the primary method needed for checkpointing
2198+
return self.create_concurrent_cursor_from_perpartition_cursor( # type: ignore # This is a known issue that we are creating and returning a ConcurrentCursor which does not technically implement the (low-code) StreamSlicer. However, (low-code) StreamSlicer and ConcurrentCursor both implement StreamSlicer.stream_slices() which is the primary method needed for checkpointing
22002199
state_manager=self._connector_state_manager,
22012200
model_type=DatetimeBasedCursorModel,
22022201
component_definition=model.incremental_sync.__dict__,
2203-
stream_name=model.name,
2202+
stream_name=model.name or "",
22042203
stream_namespace=None,
22052204
config=config or {},
22062205
stream_state=stream_state,
@@ -2210,7 +2209,7 @@ def _build_concurrent_cursor(
22102209
)
22112210
elif model.incremental_sync:
22122211
if type(model.incremental_sync) == IncrementingCountCursorModel:
2213-
return self.create_concurrent_cursor_from_incrementing_count_cursor(
2212+
return self.create_concurrent_cursor_from_incrementing_count_cursor( # type: ignore # This is a known issue that we are creating and returning a ConcurrentCursor which does not technically implement the (low-code) StreamSlicer. However, (low-code) StreamSlicer and ConcurrentCursor both implement StreamSlicer.stream_slices() which is the primary method needed for checkpointing
22142213
model_type=IncrementingCountCursorModel,
22152214
component_definition=model.incremental_sync.__dict__,
22162215
stream_name=model.name or "",

0 commit comments

Comments
 (0)