Skip to content

Commit a529a9f

Browse files
committed
chore: fix PR comments
1 parent 5f7e3a2 commit a529a9f

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ qa: analyze test
33
analyze:
44
@poetry run pylint eventsourcingdb tests
55

6-
fix:
6+
format:
77
@poetry run autopep8 --in-place --aggressive --max-line-length=100 --recursive eventsourcingdb tests
88

99
test:
@@ -13,4 +13,4 @@ clean:
1313

1414
build: qa clean
1515

16-
.PHONY: fix analyze build clean qa test
16+
.PHONY: analyze build clean format qa test

eventsourcingdb/handlers/observe_events/observe_events_options.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@
1010
@dataclass
1111
class ObserveEventsOptions:
1212
recursive: bool
13-
lower_bound: LowerBound | None = None # Changed from str to LowerBound
13+
lower_bound: LowerBound | None = None
1414
from_latest_event: ObserveFromLatestEvent | None = None
1515

1616
def validate(self) -> None:
17-
# Update validation logic
1817
if self.lower_bound is not None and not isinstance(self.lower_bound, LowerBound):
1918
raise ValidationError(
2019
'ObserveEventsOptions are invalid: lower_bound must be a LowerBound object.'

tests/test_read_events.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ async def test_throws_error_for_exclusive_options(
310310
type='com.foo.bar',
311311
if_event_is_missing=IfEventIsMissingDuringRead.READ_EVERYTHING
312312
),
313-
lower_bound='0'
313+
lower_bound=LowerBound(id='0', type='exclusive'),
314314
)
315315
):
316316
pass
@@ -343,7 +343,7 @@ async def test_throws_error_for_invalid_lower_bound(
343343
'/',
344344
ReadEventsOptions(
345345
recursive=True,
346-
lower_bound='hello'
346+
lower_bound=LowerBound(id='hello', type='inclusive')
347347
)
348348
):
349349
pass
@@ -360,7 +360,7 @@ async def test_throws_error_for_negative_lower_bound(
360360
'/',
361361
ReadEventsOptions(
362362
recursive=True,
363-
lower_bound='-1'
363+
lower_bound=LowerBound(id='-1', type='inclusive')
364364
)
365365
):
366366
pass
@@ -377,7 +377,7 @@ async def test_throws_error_for_invalid_upper_bound(
377377
'/',
378378
ReadEventsOptions(
379379
recursive=True,
380-
upper_bound='hello'
380+
upper_bound=UpperBound(id='hello', type='exclusive')
381381
)
382382
):
383383
pass
@@ -394,7 +394,7 @@ async def test_throws_error_for_negative_upper_bound(
394394
'/',
395395
ReadEventsOptions(
396396
recursive=True,
397-
upper_bound='-1'
397+
upper_bound=UpperBound(id='-1', type='exclusive')
398398
)
399399
):
400400
pass

0 commit comments

Comments
 (0)