mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-03-28 17:42:56 +01:00
- 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
41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.5.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
- id: check-added-large-files
|
|
- id: check-merge-conflict
|
|
- id: check-toml
|
|
- id: debug-statements
|
|
|
|
- repo: https://github.com/psf/black
|
|
rev: 24.3.0
|
|
hooks:
|
|
- id: black
|
|
language_version: python3.11
|
|
args: ["--line-length=88"]
|
|
|
|
- repo: https://github.com/pycqa/flake8
|
|
rev: 7.0.0
|
|
hooks:
|
|
- id: flake8
|
|
args: ["--config=.flake8"]
|
|
additional_dependencies:
|
|
- flake8-bugbear
|
|
- flake8-comprehensions
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
rev: v1.9.0
|
|
hooks:
|
|
- id: mypy
|
|
exclude: ^alembic/
|
|
additional_dependencies:
|
|
- pydantic>=2.0.0
|
|
- pydantic-settings>=2.0.0
|
|
- sqlalchemy>=2.0.0
|
|
- fastapi>=0.100.0
|
|
- types-paho-mqtt>=1.6.0
|
|
args: ["--ignore-missing-imports"]
|