chore: migrate to ruff (#4305)
* base requirements * autofix * Configure ruff for Python linting and formatting - Set up minimal ruff configuration with basic checks (E, W, F, I) - Add temporary ignores for common issues during migration - Configure pre-commit hooks to use ruff with pass_filenames - This enables gradual migration from black to ruff * Delete sdj * autofixed only * migrate lint action * more autofixed * more fixes * change precommit * try changing the hook * try this stuff
This commit is contained in:
@@ -13,23 +13,13 @@ repos:
|
||||
hooks:
|
||||
- id: trufflehog
|
||||
name: TruffleHog
|
||||
entry: bash -c 'trufflehog git file://. --since-commit HEAD --results=verified,unknown --fail'
|
||||
entry: bash -c 'trufflehog git file://. --since-commit HEAD --results=verified,unknown --fail --no-update'
|
||||
language: system
|
||||
stages: ["pre-commit", "pre-push"]
|
||||
- id: autoflake
|
||||
name: autoflake
|
||||
entry: bash -c '[ -d "apps/core" ] && cd apps/core; uv run autoflake --remove-all-unused-imports --remove-unused-variables --in-place --recursive --ignore-init-module-imports .'
|
||||
language: system
|
||||
types: [python]
|
||||
- id: isort
|
||||
name: isort
|
||||
entry: bash -c '[ -d "apps/core" ] && cd apps/core; uv run isort --profile black .'
|
||||
language: system
|
||||
types: [python]
|
||||
exclude: ^docs/
|
||||
- id: black
|
||||
name: black
|
||||
entry: bash -c '[ -d "apps/core" ] && cd apps/core; uv run black --line-length 140 --target-version py310 --target-version py311 .'
|
||||
language: system
|
||||
types: [python]
|
||||
exclude: ^docs/
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.12.11
|
||||
hooks:
|
||||
- id: ruff-check
|
||||
args: [ --fix ]
|
||||
- id: ruff-format
|
||||
|
||||
Reference in New Issue
Block a user