chore: enforce ruff lint and format standards across backend
This commit is contained in:
parent
a8e312a4f8
commit
a6cc585dd0
39 changed files with 459 additions and 559 deletions
|
|
@ -1,9 +1,7 @@
|
|||
from logging.config import fileConfig
|
||||
|
||||
from sqlalchemy import engine_from_config
|
||||
from sqlalchemy import pool
|
||||
|
||||
from alembic import context
|
||||
from sqlalchemy import engine_from_config, pool
|
||||
|
||||
# this is the Alembic Config object, which provides
|
||||
# access to the values within the .ini file in use.
|
||||
|
|
@ -16,10 +14,11 @@ if config.config_file_name is not None:
|
|||
|
||||
# add your model's MetaData object here
|
||||
# for 'autogenerate' support
|
||||
from app.models import * # noqa: F401,F403 - register all tables
|
||||
from app.settings import settings
|
||||
from sqlmodel import SQLModel
|
||||
|
||||
from app.models import *
|
||||
from app.settings import settings
|
||||
|
||||
target_metadata = SQLModel.metadata
|
||||
|
||||
# The URL always comes from settings (repo-root .env or environment),
|
||||
|
|
@ -70,9 +69,7 @@ def run_migrations_online() -> None:
|
|||
)
|
||||
|
||||
with connectable.connect() as connection:
|
||||
context.configure(
|
||||
connection=connection, target_metadata=target_metadata
|
||||
)
|
||||
context.configure(connection=connection, target_metadata=target_metadata)
|
||||
|
||||
with context.begin_transaction():
|
||||
context.run_migrations()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue