Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #61

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# * Run "pre-commit install".
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-toml
- id: check-yaml
Expand All @@ -16,14 +16,14 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.2
rev: v0.9.6
hooks:
- id: ruff
args: [--fix, --show-fixes]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
rev: v1.15.0
hooks:
- id: mypy
additional_dependencies: ["pytest"]
Expand Down
7 changes: 4 additions & 3 deletions examples/csvimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
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,
inject,
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()
Expand Down
3 changes: 2 additions & 1 deletion examples/csvimport_orm.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
import logging
from pathlib import Path

from sqlalchemy.orm import DeclarativeBase, Mapped, Session, mapped_column

from asphalt.core import (
CLIApplicationComponent,
Context,
inject,
resource,
run_application,
)
from sqlalchemy.orm import DeclarativeBase, Mapped, Session, mapped_column

logger = logging.getLogger(__name__)

Expand Down
1 change: 0 additions & 1 deletion src/asphalt/sqlalchemy/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/test_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/test_testing_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading