fix(lint): resolve all ruff lint errors

Add ruff config to exclude alembic E402, SQLAlchemy F821, and pre-existing
E501 line-length issues. Auto-fix 69 unused imports and 2 f-strings without
placeholders. Manually fix 8 unused variables. Apply ruff format to 127 files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-14 22:17:50 -05:00
parent 2ad0367c91
commit 06a41ca9bf
133 changed files with 2927 additions and 1890 deletions

View File

@@ -5,22 +5,16 @@ tenant deletion cleanup, and allowed-IPs validation.
"""
import os
import uuid
from unittest.mock import AsyncMock, patch
import pytest
import pytest_asyncio
from sqlalchemy import select, text
from sqlalchemy import select
from app.models.vpn import VpnConfig, VpnPeer
from app.services.vpn_service import (
add_peer,
get_peer_config,
get_vpn_config,
remove_peer,
setup_vpn,
sync_wireguard_config,
_get_wg_config_path,
)
pytestmark = pytest.mark.integration
@@ -213,9 +207,8 @@ class TestTenantDeletion:
# Delete tenant 2
from app.models.tenant import Tenant
result = await admin_session.execute(
select(Tenant).where(Tenant.id == t2.id)
)
result = await admin_session.execute(select(Tenant).where(Tenant.id == t2.id))
tenant_obj = result.scalar_one()
await admin_session.delete(tenant_obj)
await admin_session.flush()