Skip to content

Commit 66439c4

Browse files
committed
Bumped poetry to 2.2.1, updated dependencies, and reformatted.
1 parent e3e7ee8 commit 66439c4

5 files changed

Lines changed: 2138 additions & 1771 deletions

File tree

.github/workflows/github-actions.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
run: make install
3535
- name: Downgrade SQLAlchemy
3636
if: ${{ matrix.sqlalchemy-version != 'default' }}
37-
run: poetry@2.1.2 run pip install -U "sqlalchemy${{ matrix.sqlalchemy-version }}"
37+
run: poetry@2.2.1 run pip install -U "sqlalchemy${{ matrix.sqlalchemy-version }}"
3838
- name: Downgrade Flask-SQLAlchemy
3939
if: ${{ matrix.sqlalchemy-version != 'default' }}
40-
run: poetry@2.1.2 run pip install -U "flask-sqlalchemy<3.1"
40+
run: poetry@2.2.1 run pip install -U "flask-sqlalchemy<3.1"
4141
- name: Lint
4242
run: make lint
4343
- name: Setup PostgreSQL database
@@ -58,7 +58,7 @@ jobs:
5858
make create-mssql-schema
5959
6060
- name: Print SQLAlchemy version
61-
run: poetry@2.1.2 run python -c "import sqlalchemy; print(f'Using sqlalchemy {sqlalchemy.__version__}')"
61+
run: poetry@2.2.1 run python -c "import sqlalchemy; print(f'Using sqlalchemy {sqlalchemy.__version__}')"
6262

6363
- name: Run tests
6464
run: make test

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
COMPOSE_FILE ?= docker/docker-compose-local.yml
44
COMPOSE_PROJECT_NAME ?= eventsourcing_sqlalchemy
55

6-
POETRY_VERSION=2.1.2
6+
POETRY_VERSION=2.2.1
77
POETRY ?= poetry@$(POETRY_VERSION)
88

99
DOTENV_BASE_FILE ?= .env-base

eventsourcing_sqlalchemy/datastore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def define_record_class(
230230
) -> Type[TEventRecord]:
231231
try:
232232
record_classes_key = (schema_name or "public") + "." + table_name
233-
(record_class, record_base_cls) = cls.record_classes[record_classes_key]
233+
record_class, record_base_cls = cls.record_classes[record_classes_key]
234234
if record_base_cls is not base_cls:
235235
raise ValueError(
236236
f"Have already defined a record class with table name {table_name} "

eventsourcing_sqlalchemy/recorders.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ def __init__(
6464
record_cls_name = "".join(
6565
[
6666
s.capitalize()
67-
for s in (schema_name or "").split("_")
68-
+ events_table_name.rstrip("s").split("_")
67+
for s in (schema_name or "").split("_") + events_table_name.rstrip(
68+
"s"
69+
).split("_")
6970
]
7071
)
7172
if not for_snapshots:

0 commit comments

Comments
 (0)