generated from john/python-template
chore: make ty check blocking with targeted suppressions
Co-authored-by: Copilot App <[email protected]>
This commit is contained in:
co-authored by
Copilot App
parent
a2bb1acd6b
commit
26f9c83f54
@@ -35,7 +35,14 @@ async def _document_ids(settings: Settings) -> set[str]:
|
||||
|
||||
async def _source_counts_by_document(settings: Settings) -> dict[str, int]:
|
||||
async with session_scope(settings=settings) as session:
|
||||
rows = await session.exec(select(Source.document_id, func.count(Source.id)).group_by(Source.document_id))
|
||||
rows = await session.exec(
|
||||
select(
|
||||
Source.document_id,
|
||||
func.count(Source.id), # ty: ignore[invalid-argument-type] - SQLAlchemy descriptor false positive.
|
||||
).group_by(
|
||||
Source.document_id # ty: ignore[invalid-argument-type] - SQLAlchemy descriptor false positive.
|
||||
)
|
||||
)
|
||||
return {str(document_id): int(count) for document_id, count in rows}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user