Skip to content

Commit c94d631

Browse files
committed
style: modify linting
1 parent 3d00c42 commit c94d631

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

eventsourcingdb/handlers/observe_events/observe_events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ async def observe_events(
8383
if options.lower_bound is not None:
8484
# For inclusive, include events with ID >= lower bound
8585
if (
86-
options.lower_bound.type == 'inclusive' and # pylint: disable=R2004
86+
options.lower_bound.type == 'inclusive' and # pylint: disable=R2004
8787
int(event_id) < int(options.lower_bound.id)
8888
):
8989
continue
9090
# For exclusive, include events with ID > lower bound
9191
if (
92-
options.lower_bound.type == 'exclusive' and # pylint: disable=R2004
92+
options.lower_bound.type == 'exclusive' and # pylint: disable=R2004
9393
int(event_id) <= int(options.lower_bound.id)
9494
):
9595
continue

eventsourcingdb/handlers/observe_events/observe_events_options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
@dataclass
1111
class ObserveEventsOptions:
1212
recursive: bool
13-
lower_bound: LowerBound | None = None
13+
lower_bound: LowerBound | None = None
1414
from_latest_event: ObserveFromLatestEvent | None = None
1515

1616
def validate(self) -> None:

eventsourcingdb/handlers/read_events/read_events.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,27 +79,27 @@ async def read_events(
7979
if options.lower_bound is not None:
8080
# For inclusive, include events with ID >= lower bound
8181
if (
82-
options.lower_bound.type == 'inclusive' and # pylint: disable=R2004
82+
options.lower_bound.type == 'inclusive' and # pylint: disable=R2004
8383
int(event_id) < int(options.lower_bound.id)
8484
):
8585
continue
8686
# For exclusive, include events with ID > lower bound
8787
if (
88-
options.lower_bound.type == 'exclusive' and # pylint: disable=R2004
88+
options.lower_bound.type == 'exclusive' and # pylint: disable=R2004
8989
int(event_id) <= int(options.lower_bound.id)
9090
):
9191
continue
9292

9393
if options.upper_bound is not None:
9494
# For inclusive, include events with ID <= upper bound
9595
if (
96-
options.upper_bound.type == 'inclusive' and # pylint: disable=R2004
96+
options.upper_bound.type == 'inclusive' and # pylint: disable=R2004
9797
int(event_id) > int(options.upper_bound.id)
9898
):
9999
continue
100100
# For exclusive, include events with ID < upper bound
101101
if (
102-
options.upper_bound.type == 'exclusive' and # pylint: disable=R2004
102+
options.upper_bound.type == 'exclusive' and # pylint: disable=R2004
103103
int(event_id) >= int(options.upper_bound.id)
104104
):
105105
continue

eventsourcingdb/handlers/upper_bound.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ class UpperBound:
99
type: str
1010

1111
def __post_init__(self):
12-
if self.type not in {'inclusive', 'exclusive'}:
12+
if self.type not in {"inclusive", "exclusive"}:
1313
raise InvalidParameterError(
14-
parameter_name='UpperBound',
15-
reason='type must be either "inclusive" or "exclusive"'
14+
parameter_name="UpperBound",
15+
reason='type must be either "inclusive" or "exclusive"',
1616
)
1717
if int(self.id) < 0:
1818
raise InvalidParameterError(
19-
parameter_name='UpperBound',
20-
reason='id must be non-negative'
21-
)
19+
parameter_name="UpperBound", reason="id must be non-negative"
20+
)

0 commit comments

Comments
 (0)