From d1d0abeb11127ee2c3e9b2d6cd13f46bf1290295 Mon Sep 17 00:00:00 2001 From: Justin Visser Date: Sat, 7 Mar 2026 15:59:31 +0100 Subject: [PATCH] fix(ci): fix mypy error in bulk_toggle_scholars Use int(cursor.rowcount) instead of type: ignore comment. --- app/services/scholars/application.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/scholars/application.py b/app/services/scholars/application.py index 1dbaa7d..a19d9de 100644 --- a/app/services/scholars/application.py +++ b/app/services/scholars/application.py @@ -65,7 +65,7 @@ async def bulk_toggle_scholars( ) -> int: from sqlalchemy import update - result = await db_session.execute( + cursor = await db_session.execute( update(ScholarProfile) .where( ScholarProfile.id.in_(scholar_profile_ids), @@ -74,7 +74,7 @@ async def bulk_toggle_scholars( .values(is_enabled=is_enabled) ) await db_session.commit() - return result.rowcount # type: ignore[return-value] + return int(cursor.rowcount) __all__ = [