27c50e49cf
Backend (mypy - 56 errors fixed): - database.py: Fix async generator return type to AsyncGenerator - database_models.py: Add type annotations for SQLEnum columns - middleware.py: Use explicit Optional for exempt_paths parameter - mail_processor.py: Fix type narrowing in fetch_emails, add Dict type annotation for KNOWN_PROVIDERS - users.py, auth.py, providers.py, tasks.py: Add type: ignore comments for SQLAlchemy Column assignment patterns Frontend (eslint - 3 errors, 2 warnings fixed): - login/page.tsx: Replace any with unknown + type narrowing, prefix unused vars with underscore - register/page.tsx: Replace any with unknown + type narrowing Add .github/copilot-instructions.md with lint-check requirements Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> Agent-Logs-Url: https://github.com/christianlouis/pop_puller_to_gmail/sessions/dac7ab78-fe27-4fe4-890f-32c6c1c6d881
859 B
859 B
Copilot Instructions
Linting Requirements
Before committing any changes, always run the relevant linters and fix all errors:
Backend (Python)
# Check code formatting
black --check backend/
# Lint with ruff
ruff check backend/
# Type check with mypy
mypy backend/app --ignore-missing-imports
Frontend (TypeScript/React)
cd frontend
npm run lint
Conventions
- Python: Follow PEP 8. Use
blackfor formatting. All ruff and mypy errors must be resolved before committing. - TypeScript: Follow the ESLint configuration. Avoid
anytypes — useunknownwith type narrowing instead. Remove unused variables and imports. - SQLAlchemy: Use
# type: ignore[assignment]for Column attribute assignments and# noqa: E712for== Truecomparisons in SQLAlchemy queries (these are valid ORM patterns).