File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed
eventsourcingdb/handlers/observe_events Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ qa: analyze test
33analyze :
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
99test :
1313
1414build : qa clean
1515
16- .PHONY : fix analyze build clean qa test
16+ .PHONY : analyze build clean format qa test
Original file line number Diff line number Diff line change 1010@dataclass
1111class 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.'
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments