Compare commits

...

1 Commits

Author SHA1 Message Date
Devin AI
f2b4429c45 fix: use uv directly in pre-commit hooks for cross-platform support
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>
2026-01-31 23:17:28 +00:00

View File

@@ -3,19 +3,19 @@ repos:
hooks:
- id: ruff
name: ruff
entry: bash -c 'source .venv/bin/activate && uv run ruff check --config pyproject.toml "$@"' --
entry: uv run ruff check --config pyproject.toml
language: system
pass_filenames: true
types: [python]
- id: ruff-format
name: ruff-format
entry: bash -c 'source .venv/bin/activate && uv run ruff format --config pyproject.toml "$@"' --
entry: uv run ruff format --config pyproject.toml
language: system
pass_filenames: true
types: [python]
- id: mypy
name: mypy
entry: bash -c 'source .venv/bin/activate && uv run mypy --config-file pyproject.toml "$@"' --
entry: uv run mypy --config-file pyproject.toml
language: system
pass_filenames: true
types: [python]
@@ -30,4 +30,3 @@ repos:
- id: commitizen
- id: commitizen-branch
stages: [ pre-push ]