MemGPT/.pre-commit-config.yaml
Shubham Naik 07a0b6b55c chore: fix end fo file fixer (#541)
Co-authored-by: Shubham Naik <shub@memgpt.ai>
2025-01-08 10:53:24 -08:00

31 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/.*|.*/.*\.(scss|css|html)'
- id: trailing-whitespace
exclude: 'docs/.*|tests/data/.*|letta/server/static_files/.*'
- repo: local
hooks:
- id: autoflake
name: 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]
- id: isort
name: isort
entry: bash -c 'cd apps/core && poetry run isort --profile black .'
language: system
types: [python]
exclude: ^docs/
- id: black
name: black
entry: bash -c 'cd apps/core && poetry run black --line-length 140 --target-version py310 --target-version py311 .'
language: system
types: [python]
exclude: ^docs/