Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tolik0 committed Jul 16, 2024
1 parent b2fd84a commit d235ac5
Show file tree
Hide file tree
Showing 3 changed files with 543 additions and 536 deletions.
1 change: 0 additions & 1 deletion airbyte-cdk/python/airbyte_cdk/sources/abstract_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ def read(
)
break
except Exception as e:
print(e)
yield from self._emit_queued_messages()
logger.exception(f"Encountered an exception while reading stream {configured_stream.stream.name}")
logger.info(f"Marking stream {configured_stream.stream.name} as STOPPED")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ def __init__(

@property
def _cursor_field(self) -> str:
return self._date_time_based_cursor.cursor_field.eval(
self._date_time_based_cursor.config
) # type: ignore # eval returns a string in this context
return self._date_time_based_cursor.cursor_field.eval(self._date_time_based_cursor.config) # type: ignore # eval returns a string in this context

@property
def _start_date_from_config(self) -> datetime.datetime:
Expand Down Expand Up @@ -111,7 +109,7 @@ def _get_state_value(self, stream_state: StreamState, stream_slice: StreamSlice)
return partition_state.get(self._cursor_field) if partition_state else None

if self._is_global_parent_cursor:
return stream_state.get("state", {}).get(self._cursor_field)
return stream_state.get("state", {}).get(self._cursor_field) # type: ignore # state is inside a dict for GlobalParentCursor

return stream_state.get(self._cursor_field)

Expand Down
Loading

0 comments on commit d235ac5

Please sign in to comment.