fix: use bash for pre-commit hook (#530)
This commit is contained in:
@@ -13,21 +13,18 @@ repos:
|
||||
hooks:
|
||||
- id: autoflake
|
||||
name: autoflake
|
||||
entry: poetry run autoflake
|
||||
entry: bash -c 'cd apps/core && poetry run autoflake --remove-all-unused-imports --remove-unused-variables --in-place --recursive --ignore-init-module-imports .'
|
||||
language: system
|
||||
types: [python]
|
||||
args: ['--remove-all-unused-imports', '--remove-unused-variables', '--in-place', '--recursive', '--ignore-init-module-imports']
|
||||
- id: isort
|
||||
name: isort
|
||||
entry: bash -c 'cd apps/core && poetry run isort .'
|
||||
entry: bash -c 'cd apps/core && poetry run isort --profile black .'
|
||||
language: system
|
||||
types: [python]
|
||||
args: ['--profile', 'black']
|
||||
exclude: ^docs/
|
||||
- id: black
|
||||
name: black
|
||||
entry: bash -c 'cd apps/core && poetry run black .'
|
||||
entry: bash -c 'cd apps/core && poetry run black --line-length 140 --target-version py310 --target-version py311 .'
|
||||
language: system
|
||||
types: [python]
|
||||
args: ['--line-length', '140', '--target-version', 'py310', '--target-version', 'py311']
|
||||
exclude: ^docs/
|
||||
|
||||
Reference in New Issue
Block a user