ci(pre-commit-config.yaml): add isort as a pre-commit hook

This commit is contained in:
Krrish Dholakia 2024-06-15 16:48:00 -07:00
parent f84941bdc0
commit 877b37c6de

View file

@ -1,4 +1,19 @@
repos:
- repo: local
hooks:
# - id: mypy
# name: mypy
# entry: python3 -m mypy --ignore-missing-imports
# language: system
# types: [python]
# files: ^litellm/
- id: isort
name: isort
entry: isort
language: system
types: [python]
files: litellm/.*\.py
exclude: ^litellm/__init__.py$
- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
@ -16,18 +31,10 @@ repos:
name: Check if files match
entry: python3 ci_cd/check_files_match.py
language: system
- repo: local
hooks:
- id: mypy
name: mypy
entry: python3 -m mypy --ignore-missing-imports
language: system
types: [python]
files: ^litellm/
- id: check-file-length
name: Check file length
entry: python check_file_length.py
args: ["10000"] # set your desired maximum number of lines
language: python
files: litellm/.*\.py
exclude: ^litellm/tests/
# - id: check-file-length
# name: Check file length
# entry: python check_file_length.py
# args: ["10000"] # set your desired maximum number of lines
# language: python
# files: litellm/.*\.py
# exclude: ^litellm/tests/