-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Copy path.pre-commit-config.yaml
33 lines (32 loc) · 1.38 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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: bash -c '[ -d "apps/core" ] && 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 '[ -d "apps/core" ] && cd apps/core; poetry run isort --profile black .'
language: system
types: [python]
args: ['--profile', 'black']
exclude: ^docs/
- id: black
name: black
entry: bash -c '[ -d "apps/core" ] && 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/