Files
instructor/.pre-commit-config.yaml
2024-02-05 18:37:03 -05:00

24 lines
1014 B
YAML

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.7 # Ruff version
hooks:
- id: ruff # Run the linter.
name: Run Linter Check (Ruff)
args: [ --fix ]
files: ^(instructor|tests|examples)/
- id: ruff-format # Run the formatter.
name: Run Formatter (Ruff)
- repo: local
hooks:
- id: ci_type_mypy
name: Run Type Check (Mypy)
entry: >
bash -c 'set -o pipefail;
export CUSTOM_PACKAGES="instructor/_types/_alias.py instructor/cli/cli.py instructor/cli/files.py instructor/cli/usage.py instructor/exceptions.py" &&
export CUSTOM_FLAGS="--python-version=3.9 --color-output --no-pretty --follow-imports=skip" &&
curl -sSL https://raw.githubusercontent.com/gao-hongnan/omniverse/2fd5de1b8103e955cd5f022ab016b72fa901fa8f/scripts/devops/continuous-integration/type_mypy.sh |
bash'
language: system
types: [python]
pass_filenames: false