Skip to content

Commit b2c53be

Browse files
committed
modify auto format with ruff linting
1 parent 3365bb9 commit b2c53be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+621
-847
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ TEST_DIR := tests
44
PYTHON_DIRS := $(PACKAGE) $(TEST_DIR)
55

66
# Default target and help
7-
.DEFAULT_GOAL := help
7+
.DEFAULT_GOAL := .PHONY
88
help:
99
@echo "Available commands:"
1010
@echo " qa : Run analysis and tests"
@@ -20,11 +20,11 @@ qa: analyze test
2020

2121
analyze:
2222
@echo "Running code analysis..."
23-
@uv run ruff $(PYTHON_DIRS)
23+
@uv run ruff check $(PYTHON_DIRS)
2424

2525
format:
2626
@echo "Formatting code..."
27-
@uv run ruff format --in-place --aggressive --max-line-length=100 --recursive $(PYTHON_DIRS)
27+
@uv run ruff format $(PYTHON_DIRS)
2828

2929
lock:
3030
@echo "Updating dependency lock..."

eventsourcingdb/__init__.py

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,38 @@
11
from .bound import Bound, BoundType
22
from .client import Client
33
from .container import Container
4-
from .event import Event, EventCandidate
54
from .errors import ClientError, CustomError, InternalError, ServerError, ValidationError
5+
from .event import Event, EventCandidate
66
from .observe_events import (
7+
IfEventIsMissingDuringObserve,
78
ObserveEventsOptions,
89
ObserveFromLatestEvent,
9-
IfEventIsMissingDuringObserve
1010
)
11-
from .read_events import ReadEventsOptions, ReadFromLatestEvent, IfEventIsMissingDuringRead, Order
1211
from .read_event_types import EventType
13-
from .write_events import Precondition, IsSubjectOnEventId, IsSubjectPristine
14-
12+
from .read_events import IfEventIsMissingDuringRead, Order, ReadEventsOptions, ReadFromLatestEvent
13+
from .write_events import IsSubjectOnEventId, IsSubjectPristine, Precondition
1514

1615
__all__ = [
17-
'Bound', 'BoundType',
18-
'Client',
19-
'Container',
20-
'Event', 'EventCandidate',
21-
'EventType',
22-
'ObserveEventsOptions', 'ObserveFromLatestEvent', 'IfEventIsMissingDuringObserve',
23-
'Precondition', 'IsSubjectOnEventId', 'IsSubjectPristine',
24-
'ReadEventsOptions', 'ReadFromLatestEvent', 'IfEventIsMissingDuringRead', 'Order',
25-
'ClientError', 'CustomError', 'InternalError', 'ServerError', 'ValidationError',
16+
"Bound",
17+
"BoundType",
18+
"Client",
19+
"ClientError",
20+
"Container",
21+
"CustomError",
22+
"Event",
23+
"EventCandidate",
24+
"EventType",
25+
"IfEventIsMissingDuringObserve",
26+
"IfEventIsMissingDuringRead",
27+
"InternalError",
28+
"IsSubjectOnEventId",
29+
"IsSubjectPristine",
30+
"ObserveEventsOptions",
31+
"ObserveFromLatestEvent",
32+
"Order",
33+
"Precondition",
34+
"ReadEventsOptions",
35+
"ReadFromLatestEvent",
36+
"ServerError",
37+
"ValidationError",
2638
]

eventsourcingdb/bound.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,4 @@ class Bound:
1313
type: BoundType
1414

1515
def to_json(self) -> dict[str, str]:
16-
return {
17-
'id': self.id,
18-
'type': self.type.value
19-
}
16+
return {"id": self.id, "type": self.type.value}

0 commit comments

Comments
 (0)