Add flake8-sfs

This commit is contained in:
Alexander Hess 2026-11-28 03:34:40 +01:00
commit cb8f919b1f
Signed by: alexander
GPG key ID: B46EDB4DFC26805D
2 changed files with 44 additions and 60 deletions

View file

@ -33,17 +33,14 @@ def include_object(obj, _name, type_, _reflected, _compare_to):
engine = sa.create_engine(velofy_config.DATABASE_URI)
test_schema = f"_{velofy_config.CLEAN_SCHEMA}" if os.getenv("TESTING") else ""
with engine.connect() as connection:
context.configure(
connection=connection,
include_object=include_object,
target_metadata=db.Base.metadata,
version_table="{alembic_table}{test_schema}".format(
alembic_table=velofy_config.ALEMBIC_TABLE,
test_schema=(
f"_{velofy_config.CLEAN_SCHEMA}" if os.getenv("TESTING") else ""
),
),
version_table=f"{velofy_config.ALEMBIC_TABLE}{test_schema}",
version_table_schema=velofy_config.ALEMBIC_TABLE_SCHEMA,
)

View file

@ -299,7 +299,7 @@ def upgrade():
*(
sa.CheckConstraint(
constraint,
name="ordered_timestamps_{index}".format(index=index),
name=f"ordered_timestamps_{index}",
)
for index, constraint in enumerate(
(