Skip to content

Commit f4d351f

Browse files
authored
refactor(repository): migrate in-tree callers to advanced_alchemy.filters (#4735)
Three call sites in tests and examples still imported `LimitOffset` from `litestar.repository.filters` even though `advanced_alchemy.filters` has been the canonical home for those types. This swaps the imports so the package is warning-free against itself, plus a small isort follow-up to keep the grouped `advanced_alchemy` imports tidy.
1 parent 326e988 commit f4d351f

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

docs/examples/sqla/sqlalchemy_repository_bulk_operations.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
from typing import Any
44

55
from advanced_alchemy.extensions.litestar import base, repository
6+
from advanced_alchemy.filters import LimitOffset
67
from rich import get_console
78
from sqlalchemy import create_engine
89
from sqlalchemy.orm import Mapped, Session, sessionmaker
910

10-
from litestar.repository.filters import LimitOffset
11-
1211
here = Path(__file__).parent
1312
console = get_console()
1413

docs/examples/sqla/sqlalchemy_sync_repository.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
base,
1111
repository,
1212
)
13+
from advanced_alchemy.filters import LimitOffset
1314
from pydantic import BaseModel as _BaseModel
1415
from pydantic import TypeAdapter
1516
from sqlalchemy import ForeignKey, select
@@ -21,7 +22,6 @@
2122
from litestar.handlers.http_handlers.decorators import delete, patch, post
2223
from litestar.pagination import OffsetPagination
2324
from litestar.params import Parameter
24-
from litestar.repository.filters import LimitOffset
2525

2626
if TYPE_CHECKING:
2727
from sqlalchemy.orm import Session

tests/e2e/test_advanced_alchemy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from advanced_alchemy.extensions.litestar.plugins import SQLAlchemyInitPlugin, SQLAlchemySyncConfig
2+
from advanced_alchemy.filters import LimitOffset
23

34
from litestar import get
4-
from litestar.repository.filters import LimitOffset
55
from litestar.testing import create_test_client
66

77

0 commit comments

Comments
 (0)