From 22c4d95b914067608b03d48e3f1d683066ac4afc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 01:10:16 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- singer_sdk/streams/core.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/singer_sdk/streams/core.py b/singer_sdk/streams/core.py index 2f61dee74..af954fc33 100644 --- a/singer_sdk/streams/core.py +++ b/singer_sdk/streams/core.py @@ -281,6 +281,7 @@ def get_starting_timestamp(self, context: dict | None) -> datetime.datetime | No >>> from singer_sdk import Tap >>> class MyTap(Tap): ... name = "my_tap" + ... ... def discover_streams(self): ... return [ ... MyStream( @@ -293,25 +294,25 @@ def get_starting_timestamp(self, context: dict | None) -> datetime.datetime | No ... "format": "date-time", ... }, ... } - ... } + ... }, ... ) ... ] >>> tap = MyTap( ... config={}, ... state={ - ... 'bookmarks': { - ... 'my_stream': { - ... 'partitions': [], - ... 'replication_key': 'updated_at', - ... 'replication_key_value': '2020-01-01T00:00:00Z' + ... "bookmarks": { + ... "my_stream": { + ... "partitions": [], + ... "replication_key": "updated_at", + ... "replication_key_value": "2020-01-01T00:00:00Z", ... } ... } - ... } + ... }, ... ) - >>> tap.streams['my_stream'].is_timestamp_replication_key + >>> tap.streams["my_stream"].is_timestamp_replication_key True - >>> tap.streams['my_stream']._write_starting_replication_value(None) - >>> tap.streams['my_stream'].get_starting_timestamp(None) + >>> tap.streams["my_stream"]._write_starting_replication_value(None) + >>> tap.streams["my_stream"].get_starting_timestamp(None) DateTime(2020, 1, 1, 0, 0, 0, tzinfo=Timezone('UTC')) """ value = self.get_starting_replication_key_value(context)