refactor: consolidate linting tools into Ruff
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
+6
-28
@@ -19,35 +19,13 @@ repos:
|
||||
- id: detect-aws-credentials
|
||||
args: ['--allow-missing-credentials']
|
||||
|
||||
# Python code formatting
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 24.1.1
|
||||
# Ruff - Fast Python linter and formatter (replaces Black, Flake8, isort, Bandit)
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.3.0
|
||||
hooks:
|
||||
- id: black
|
||||
args: ['--line-length=120']
|
||||
language_version: python3.11
|
||||
|
||||
# Import sorting
|
||||
- repo: https://github.com/PyCQA/isort
|
||||
rev: 5.13.2
|
||||
hooks:
|
||||
- id: isort
|
||||
args: ['--profile=black', '--line-length=120']
|
||||
|
||||
# Linting
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: 7.0.0
|
||||
hooks:
|
||||
- id: flake8
|
||||
args: ['--max-line-length=120', '--extend-ignore=E203,W503']
|
||||
|
||||
# Security linting
|
||||
- repo: https://github.com/PyCQA/bandit
|
||||
rev: 1.7.6
|
||||
hooks:
|
||||
- id: bandit
|
||||
args: ['-ll', '-r', 'app/']
|
||||
exclude: 'tests/'
|
||||
- id: ruff
|
||||
args: [ --fix ]
|
||||
- id: ruff-format
|
||||
|
||||
# Type checking
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
|
||||
Reference in New Issue
Block a user