Fix all 33 ruff linting errors causing CI failures

- Remove unused imports (F401) across 17 files
- Fix f-strings without placeholders (F541) in 3 files
- Add noqa: E712 to SQLAlchemy == True comparisons (valid ORM pattern)
- Preserve alembic side-effect import with noqa: F401

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/pop_puller_to_gmail/sessions/99c3a25f-3479-473d-ac95-9faaa0ddd55b
This commit is contained in:
copilot-swe-agent[bot]
2026-03-23 10:38:39 +00:00
parent 1463ad225c
commit a918421945
17 changed files with 18 additions and 29 deletions
+2 -4
View File
@@ -5,7 +5,6 @@ Celery tasks for background email processing.
import asyncio
import os
from datetime import datetime, timedelta
from typing import List
from celery import Task
import logging
@@ -24,7 +23,6 @@ from app.services.mail_processor import MailProcessor
from app.services.gmail_service import GmailService, GmailInjectionError
from app.core.config import settings
from sqlalchemy import select, and_
from sqlalchemy.ext.asyncio import AsyncSession
logger = logging.getLogger(__name__)
@@ -94,7 +92,7 @@ async def process_mail_account(account_id: int):
gmail_cred_result = await db.execute(
select(GmailCredential).where(
GmailCredential.user_id == account.user_id,
GmailCredential.is_valid == True,
GmailCredential.is_valid == True, # noqa: E712
)
)
gmail_cred = gmail_cred_result.scalar_one_or_none()
@@ -222,7 +220,7 @@ async def process_all_enabled_accounts():
result = await db.execute(
select(MailAccount).where(
and_(
MailAccount.is_enabled == True,
MailAccount.is_enabled == True, # noqa: E712
MailAccount.status.in_(
[AccountStatus.ACTIVE, AccountStatus.TESTING]
),