Skip to content

Commit

Permalink
style: run isort
Browse files Browse the repository at this point in the history
  • Loading branch information
e-kondr01 committed Feb 20, 2024
1 parent 0a7a910 commit 81b1ec3
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 15 deletions.
9 changes: 7 additions & 2 deletions examples/app/api/endpoints/child.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@
from app.api.deps import Session
from app.managers import child_manager
from app.models import Child, Parent
from app.schemas import (ChildDetailSchema, ChildListSchema, CreateChildSchema,
HTTPErrorSchema, PatchChildSchema)
from app.schemas import (
ChildDetailSchema,
ChildListSchema,
CreateChildSchema,
HTTPErrorSchema,
PatchChildSchema,
)

router = APIRouter()

Expand Down
9 changes: 7 additions & 2 deletions examples/app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
from uuid import UUID, uuid4

from sqlalchemy import DateTime, ForeignKey, func
from sqlalchemy.orm import (DeclarativeBase, Mapped, declared_attr,
mapped_column, relationship)
from sqlalchemy.orm import (
DeclarativeBase,
Mapped,
declared_attr,
mapped_column,
relationship,
)


class Base(DeclarativeBase):
Expand Down
3 changes: 1 addition & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from typing import AsyncGenerator

import pytest
from sqlalchemy.ext.asyncio import (AsyncConnection, AsyncSession,
AsyncTransaction)
from sqlalchemy.ext.asyncio import AsyncConnection, AsyncSession, AsyncTransaction

from tests.db import async_session_factory, engine
from tests.models import Base
Expand Down
12 changes: 8 additions & 4 deletions tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@

from fastapi_sqlalchemy_toolkit.model_manager import ModelManager
from pydantic import BaseModel
from sqlalchemy import (Column, DateTime, ForeignKey, Table, UniqueConstraint,
func)
from sqlalchemy.orm import (DeclarativeBase, Mapped, declared_attr,
mapped_column, relationship)
from sqlalchemy import Column, DateTime, ForeignKey, Table, UniqueConstraint, func
from sqlalchemy.orm import (
DeclarativeBase,
Mapped,
declared_attr,
mapped_column,
relationship,
)


class Base(DeclarativeBase):
Expand Down
16 changes: 11 additions & 5 deletions tests/test_public_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@
from fastapi import HTTPException
from sqlalchemy import insert, select
from sqlalchemy.exc import MissingGreenlet
from sqlalchemy.ext.asyncio import (AsyncConnection, AsyncSession,
AsyncTransaction)
from sqlalchemy.ext.asyncio import AsyncConnection, AsyncSession, AsyncTransaction
from sqlalchemy.orm import selectinload

from tests.models import (Category, CategorySchema, Child, Parent,
ParentSchema, category_manager, child_manager,
parent_manager)
from tests.models import (
Category,
CategorySchema,
Child,
Parent,
ParentSchema,
category_manager,
child_manager,
parent_manager,
)


async def test_get(session: AsyncSession):
Expand Down

0 comments on commit 81b1ec3

Please sign in to comment.