Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 19, 2024
1 parent 0d90e8d commit 22c4d95
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions singer_sdk/streams/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)
Expand Down

0 comments on commit 22c4d95

Please sign in to comment.