added ruff to precommit hook

This commit is contained in:
Utkarsh-Patel-13 2025-07-24 14:53:31 -07:00
parent d359a59f6d
commit af6caf8cf5

View file

@ -38,38 +38,18 @@ repos:
.*\.mdx$
)$
# Python Backend Hooks (surfsense_backend)
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
files: ^surfsense_backend/
language_version: python3
- repo: https://github.com/pycqa/isort
rev: 6.0.1
hooks:
- id: isort
files: ^surfsense_backend/
args: ["--profile", "black", "--line-length", "88"]
# Python Backend Hooks (surfsense_backend) - Using Ruff for linting and formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.4
rev: v0.12.5
hooks:
- id: ruff
name: ruff-lint
files: ^surfsense_backend/
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
name: ruff-format
files: ^surfsense_backend/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.17.0
hooks:
- id: mypy
files: ^surfsense_backend/
additional_dependencies: []
args: [--ignore-missing-imports, --disallow-untyped-defs]
- repo: https://github.com/PyCQA/bandit
rev: 1.8.6
hooks: