Skip to content

Commit e1835c2

Browse files
committed
remove lowerbound and upperbound validation in client.py
1 parent 17da153 commit e1835c2

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

eventsourcingdb/client.py

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -168,32 +168,6 @@ async def read_events(
168168

169169
if is_event(message):
170170
event = Event.parse(message['payload'])
171-
event_id = int(message['payload']['id'])
172-
173-
if options.lower_bound is not None:
174-
if (
175-
options.lower_bound.type == 'inclusive' and # pylint: disable=R2004
176-
int(event_id) < int(options.lower_bound.id)
177-
):
178-
continue
179-
if (
180-
options.lower_bound.type == 'exclusive' and # pylint: disable=R2004
181-
int(event_id) <= int(options.lower_bound.id)
182-
):
183-
continue
184-
185-
if options.upper_bound is not None:
186-
if (
187-
options.upper_bound.type == 'inclusive' and # pylint: disable=R2004
188-
int(event_id) > int(options.upper_bound.id)
189-
):
190-
continue
191-
if (
192-
options.upper_bound.type == 'exclusive' and # pylint: disable=R2004
193-
int(event_id) >= int(options.upper_bound.id)
194-
):
195-
continue
196-
197171
yield event
198172
continue
199173

@@ -264,20 +238,6 @@ async def observe_events(
264238

265239
if is_event(message):
266240
event = Event.parse(message['payload'])
267-
event_id = int(message['payload']['id'])
268-
269-
if options.lower_bound is not None:
270-
if (
271-
options.lower_bound.type == 'inclusive' and # pylint: disable=R2004
272-
int(event_id) < int(options.lower_bound.id)
273-
):
274-
continue
275-
if (
276-
options.lower_bound.type == 'exclusive' and # pylint: disable=R2004
277-
int(event_id) <= int(options.lower_bound.id)
278-
):
279-
continue
280-
281241
yield event
282242
continue
283243

0 commit comments

Comments
 (0)