add linters

This commit is contained in:
Pavel Sobolev
2025-11-13 01:32:17 +03:00
parent c4bb087aaf
commit d5ff05abdb
28 changed files with 2070 additions and 331 deletions

40
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,40 @@
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies:
- "django>=5.2.8,<6.0.0"
- "python-dotenv>=1.0.1,<2.0.0"
- django-stubs
- djangorestframework-stubs
- pandas-stubs
- repo: https://github.com/PyCQA/bandit
rev: 1.7.9
hooks:
- id: bandit
args: ["-r",".","-x",".venv,venv,build,dist,.tox,.mypy_cache,.ruff_cache,node_modules"]
additional_dependencies:
- "python-dotenv>=1.0.1,<2.0.0"
pass_filenames: false
- repo: https://github.com/pypa/pip-audit
rev: v2.7.3
hooks:
- id: pip-audit
args: ["--progress-spinner=off"]
pass_filenames: false
- repo: https://github.com/jendrikseipp/vulture
rev: "v2.11"
hooks:
- id: vulture
args: [".","--exclude",".venv,venv,build,dist,.tox,.mypy_cache,.ruff_cache,node_modules,**/migrations/**","--min-confidence","80"]