Fix flake8 and mypy linting errors

- Update .flake8 and pre-commit config to properly use flake8 config
- Add B008 to ignored errors (FastAPI Depends pattern)
- Add E402 to ignored errors (intentional module-level imports)
- Remove unused imports from test files and source files
- Fix f-strings without placeholders
- Add type annotations to inner async functions
- Fix SQLAlchemy execute() to use text() wrapper
- Add type: ignore comments for alembic.command imports
- Exclude alembic/ directory from mypy in pre-commit
- Update mypy overrides for test files to not require type annotations
- Fix type annotations for params dicts in web routes
- Fix generator return type in test fixtures
This commit is contained in:
Claude
2025-12-03 01:24:42 +00:00
parent c88ee99e55
commit 0ac5ba567c
35 changed files with 71 additions and 80 deletions

View File

@@ -21,6 +21,7 @@ repos:
rev: 7.0.0
hooks:
- id: flake8
args: ["--config=.flake8"]
additional_dependencies:
- flake8-bugbear
- flake8-comprehensions
@@ -29,6 +30,7 @@ repos:
rev: v1.9.0
hooks:
- id: mypy
exclude: ^alembic/
additional_dependencies:
- pydantic>=2.0.0
- pydantic-settings>=2.0.0