litellm/.pre-commit-config.yaml

40 lines
1.3 KiB
YAML

repos:
- repo: local
hooks:
- id: pyright
name: pyright
entry: pyright
language: system
types: [python]
files: ^(litellm/|litellm_proxy_extras/|enterprise/)
- id: isort
name: isort
entry: isort
language: system
types: [python]
files: (litellm/|litellm_proxy_extras/|enterprise/).*\.py
exclude: ^litellm/__init__.py$
- id: black
name: black
entry: uv run --frozen black
language: system
types: [python]
files: (litellm/|litellm_proxy_extras/).*\.py
- repo: https://github.com/pycqa/flake8
rev: 7.0.0 # The version of flake8 to use
hooks:
- id: flake8
exclude: ^litellm/tests/|^litellm/proxy/tests/|^litellm/tests/test_litellm/|^tests/test_litellm/|^tests/enterprise/
additional_dependencies: [flake8-print]
files: (litellm/|litellm_proxy_extras/|enterprise/).*\.py
- repo: local
hooks:
- id: uv-lock-check
name: uv lock check
entry: uv lock --check
language: system
files: ^(pyproject.toml|enterprise/pyproject.toml|litellm-proxy-extras/pyproject.toml|uv.lock)$
- id: check-files-match
name: Check if files match
entry: python3 ci_cd/check_files_match.py
language: system