mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-30 23:02:50 +00:00
Fixes #4322 The previous pre-commit config used bash-specific commands that don't work on Windows: - bash -c '...' wrapper - source command - Unix-style paths (.venv/bin/activate) This change simplifies the entry commands to use 'uv run' directly, which: - Works on Windows, Linux, and macOS - Automatically handles virtual environment activation - Removes the need for bash-specific syntax Co-Authored-By: João <joao@crewai.com>
33 lines
950 B
YAML
33 lines
950 B
YAML
repos:
|
|
- repo: local
|
|
hooks:
|
|
- id: ruff
|
|
name: ruff
|
|
entry: uv run ruff check --config pyproject.toml
|
|
language: system
|
|
pass_filenames: true
|
|
types: [python]
|
|
- id: ruff-format
|
|
name: ruff-format
|
|
entry: uv run ruff format --config pyproject.toml
|
|
language: system
|
|
pass_filenames: true
|
|
types: [python]
|
|
- id: mypy
|
|
name: mypy
|
|
entry: uv run mypy --config-file pyproject.toml
|
|
language: system
|
|
pass_filenames: true
|
|
types: [python]
|
|
exclude: ^(lib/crewai/src/crewai/cli/templates/|lib/crewai/tests/|lib/crewai-tools/tests/|lib/crewai-files/tests/)
|
|
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
rev: 0.9.3
|
|
hooks:
|
|
- id: uv-lock
|
|
- repo: https://github.com/commitizen-tools/commitizen
|
|
rev: v4.10.1
|
|
hooks:
|
|
- id: commitizen
|
|
- id: commitizen-branch
|
|
stages: [ pre-push ]
|