34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v2.3.0
|
|
hooks:
|
|
- id: check-yaml
|
|
exclude: 'docs/.*|tests/data/.*|configs/.*'
|
|
- id: end-of-file-fixer
|
|
exclude: 'docs/.*|tests/data/.*|letta/server/static_files/.*'
|
|
- id: trailing-whitespace
|
|
exclude: 'docs/.*|tests/data/.*|letta/server/static_files/.*'
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: autoflake
|
|
name: autoflake
|
|
entry: poetry run autoflake
|
|
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 .'
|
|
language: system
|
|
types: [python]
|
|
args: ['--profile', 'black']
|
|
exclude: ^docs/
|
|
- id: black
|
|
name: black
|
|
entry: bash -c 'cd apps/core && poetry run black .'
|
|
language: system
|
|
types: [python]
|
|
args: ['--line-length', '140', '--target-version', 'py310', '--target-version', 'py311']
|
|
exclude: ^docs/
|