From f9892eb8791e3b3ad214d1dfe06b19418cbcad9a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 22:01:40 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/csvimport.py | 7 ++++--- examples/csvimport_orm.py | 3 ++- src/asphalt/sqlalchemy/component.py | 1 - tests/test_component.py | 4 ++-- tests/test_testing_recipe.py | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/examples/csvimport.py b/examples/csvimport.py index a0c10fb..e78377c 100644 --- a/examples/csvimport.py +++ b/examples/csvimport.py @@ -9,6 +9,10 @@ import logging from pathlib import Path +from sqlalchemy.orm import Session +from sqlalchemy.sql.schema import Column, MetaData, Table +from sqlalchemy.sql.sqltypes import Integer, Unicode + from asphalt.core import ( CLIApplicationComponent, Context, @@ -16,9 +20,6 @@ resource, run_application, ) -from sqlalchemy.orm import Session -from sqlalchemy.sql.schema import Column, MetaData, Table -from sqlalchemy.sql.sqltypes import Integer, Unicode logger = logging.getLogger(__name__) metadata = MetaData() diff --git a/examples/csvimport_orm.py b/examples/csvimport_orm.py index cf0f41c..13ba7a1 100644 --- a/examples/csvimport_orm.py +++ b/examples/csvimport_orm.py @@ -9,6 +9,8 @@ import logging from pathlib import Path +from sqlalchemy.orm import DeclarativeBase, Mapped, Session, mapped_column + from asphalt.core import ( CLIApplicationComponent, Context, @@ -16,7 +18,6 @@ resource, run_application, ) -from sqlalchemy.orm import DeclarativeBase, Mapped, Session, mapped_column logger = logging.getLogger(__name__) diff --git a/src/asphalt/sqlalchemy/component.py b/src/asphalt/sqlalchemy/component.py index 52d73e7..b7ed82d 100644 --- a/src/asphalt/sqlalchemy/component.py +++ b/src/asphalt/sqlalchemy/component.py @@ -15,7 +15,6 @@ qualified_name, resolve_reference, ) - from asphalt.sqlalchemy.utils import apply_sqlite_hacks from sqlalchemy.engine import Connection, Engine, create_engine from sqlalchemy.engine.url import URL, make_url diff --git a/tests/test_component.py b/tests/test_component.py index 05a5722..b7099a7 100644 --- a/tests/test_component.py +++ b/tests/test_component.py @@ -7,8 +7,6 @@ from typing import Any import pytest -from asphalt.core import NoCurrentContext, current_context -from asphalt.core.context import Context, get_resource from pytest import FixtureRequest from sqlalchemy.engine.url import URL from sqlalchemy.event import listen, remove @@ -23,6 +21,8 @@ from sqlalchemy.pool import AsyncAdaptedQueuePool, NullPool, QueuePool from sqlalchemy.sql import text +from asphalt.core import NoCurrentContext, current_context +from asphalt.core.context import Context, get_resource from asphalt.sqlalchemy.component import SQLAlchemyComponent from asphalt.sqlalchemy.utils import clear_async_database, clear_database diff --git a/tests/test_testing_recipe.py b/tests/test_testing_recipe.py index 26fa962..6ddd59c 100644 --- a/tests/test_testing_recipe.py +++ b/tests/test_testing_recipe.py @@ -9,13 +9,13 @@ from typing import Any import pytest -from asphalt.core import ContainerComponent, Context from sqlalchemy.engine import Connection, Engine from sqlalchemy.exc import IntegrityError from sqlalchemy.ext.asyncio import AsyncConnection, AsyncEngine, AsyncSession from sqlalchemy.orm import Session from sqlalchemy.sql.expression import delete, func, select +from asphalt.core import ContainerComponent, Context from asphalt.sqlalchemy.utils import clear_async_database, clear_database from .model import Base, Person