Skip to content

Commit 5b51a1d

Browse files
committed
🔧 Reformat (codebase): Fix mypy issues on SQLAlchemy declarative mixin usage
1 parent 621fb12 commit 5b51a1d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎app/api/api_v1/router/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
ServiceException,
1919
)
2020
from app.crud.user import UserRepository, get_user_repository
21-
from app.schemas.user import User, UserCreate, UserUpdate, UsersResponse
21+
from app.schemas.user import User, UserCreate, UsersResponse, UserUpdate
2222

2323
logger: logging.Logger = logging.getLogger(__name__)
2424
router: APIRouter = APIRouter(prefix="/user", tags=["user"])

‎pipeline/models/base/audit_mixin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __declare_last__(cls) -> None:
4848
:return: None
4949
:rtype: NoneType
5050
"""
51-
table_name: str = cls.__tablename__
51+
table_name: str = cls.__tablename__ # type: ignore
5252
constraints: list[CheckConstraint] = [
5353
CheckConstraint(
5454
"created_at <= CURRENT_TIMESTAMP",
@@ -59,5 +59,5 @@ def __declare_last__(cls) -> None:
5959
name=f"{table_name}_updated_by_check",
6060
),
6161
]
62-
cls.__table__.append_constraint(constraints[0])
63-
cls.__table__.append_constraint(constraints[1])
62+
cls.__table__.append_constraint(constraints[0]) # type: ignore
63+
cls.__table__.append_constraint(constraints[1]) # type: ignore

‎pipeline/repository/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from sqlalchemy.orm import Session
1010

1111
from pipeline.core.decorators import benchmark
12-
from pipeline.models.base.base_with_id import U
12+
from pipeline.models.base.base import U
1313

1414
logger: logging.Logger = logging.getLogger(__name__)
1515

0 commit comments

Comments
 (0)