fix: resolve 21 mypy type errors across backend modules

Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/bc16203d-7907-4e3f-952f-18c760c85076

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-28 19:32:53 +00:00
parent 312fd9976f
commit 0698eca628
9 changed files with 24 additions and 23 deletions
+2 -2
View File
@@ -153,13 +153,13 @@ async def login(
# Domain restriction — superusers always bypass
if not user.is_superuser:
_check_domain_allowed(user.email)
_check_domain_allowed(str(user.email))
# Update last login
user.last_login_at = datetime.now(timezone.utc) # type: ignore[assignment]
# Auto-promote to superuser if this is the configured admin email
if not user.is_superuser and _is_admin_email(user.email):
if not user.is_superuser and _is_admin_email(str(user.email)):
user.is_superuser = True # type: ignore[assignment]
logger.info(f"Auto-promoted admin user: {user.email}")
@@ -75,7 +75,7 @@ async def create_mail_account(
"pro": settings.TIER_PRO_MAX_ACCOUNTS,
"enterprise": settings.TIER_ENTERPRISE_MAX_ACCOUNTS,
}
max_accounts = tier_limits.get(current_user.subscription_tier.value, 1)
max_accounts = tier_limits.get(current_user.subscription_tier.value, 1) # type: ignore[assignment]
if len(existing_accounts) >= max_accounts:
raise HTTPException(
@@ -320,7 +320,7 @@ async def test_existing_mail_connection(
)
try:
password = decrypt_credential(account.encrypted_password)
password = decrypt_credential(str(account.encrypted_password))
except Exception:
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
+1 -1
View File
@@ -266,7 +266,7 @@ async def save_gmail_credential(
gmail_email=credential_in.gmail_email,
encrypted_access_token=encrypted_access,
encrypted_refresh_token=encrypted_refresh,
scopes=build_gmail_credential_scopes(),
scopes=build_gmail_credential_scopes(granted_scopes=[]),
is_valid=True,
last_verified_at=datetime.now(timezone.utc),
)