diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d64f6bf..de9133b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,11 @@ jobs: pip install black isort flake8 pylint cd backend && pip install -r requirements.txt + - name: Auto-format with Black and isort + run: | + black backend/app + isort backend/app + - name: Black – format check run: black --check backend/app diff --git a/backend/app/main.py b/backend/app/main.py index 4531a75..a138648 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -15,7 +15,7 @@ from app.core.database import Base, SessionLocal, engine from app.core.security import add_api_key, generate_api_key, require_admin_auth from app.middleware.security import SecurityHeadersMiddleware from app.models.mail_source import MailSource # noqa: F401 – ensure table is registered -from app.models.user import User # noqa: F401 – ensure mapper is registered before UserDomain resolves "User" +from app.models.user import User # noqa: F401 – ensure User mapper is registered from app.services.imap_client import IMAPClient from app.services.report_store import ReportStore