mirror of
https://github.com/d3vyce/fastapi-toolsets.git
synced 2026-08-04 23:54:09 +00:00
⬆ Bump ty from 0.0.31 to 0.0.33 (#267)
* ⬆ Bump ty from 0.0.31 to 0.0.33 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.31 to 0.0.33. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.31...0.0.33) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.33 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * fix: ty warnings --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: d3vyce <nicolas.sudres@proton.me>
This commit is contained in:
@@ -1334,7 +1334,7 @@ class AsyncCrud(Generic[ModelType]):
|
||||
count_q = count_q.where(and_(*filters))
|
||||
|
||||
count_result = await session.execute(count_q)
|
||||
total_count: int | None = count_result.scalar_one()
|
||||
total_count: int = count_result.scalar_one()
|
||||
has_more = page * items_per_page < total_count
|
||||
else:
|
||||
# Fetch one extra row to detect if a next page exists without COUNT
|
||||
|
||||
@@ -179,7 +179,7 @@ class PaginatedResponse(BaseResponse, Generic[DataT]):
|
||||
]
|
||||
cls._discriminated_union_cache[item] = cached
|
||||
return cached # ty:ignore[invalid-return-type]
|
||||
return super().__class_getitem__(item)
|
||||
return super().__class_getitem__(item) # ty:ignore[invalid-return-type]
|
||||
|
||||
|
||||
class OffsetPaginatedResponse(PaginatedResponse[DataT]):
|
||||
|
||||
Reference in New Issue
Block a user