Skip to content

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

3.2 KB
Raw Blame
repos:
  - repo: local
    hooks:
      - id: ruff
        name: ruff
        entry: bash -c 'case "$OSTYPE" in msys*|cygwin*|win32*) source .venv/Scripts/activate ;; *) source .venv/bin/activate ;; esac && uv run ruff check --config pyproject.toml "$@"' --
        language: system
        pass_filenames: true
        types: [python]
      - id: ruff-format
        name: ruff-format
        entry: bash -c 'case "$OSTYPE" in msys*|cygwin*|win32*) source .venv/Scripts/activate ;; *) source .venv/bin/activate ;; esac && uv run ruff format --config pyproject.toml "$@"' --
        language: system
        pass_filenames: true
        types: [python]
      - id: mypy
        name: mypy
        entry: bash -c 'case "$OSTYPE" in msys*|cygwin*|win32*) source .venv/Scripts/activate ;; *) source .venv/bin/activate ;; esac && uv run mypy --config-file pyproject.toml "$@"' --
        language: system
        pass_filenames: true
        types: [python]
        exclude: ^(lib/crewai/src/crewai/cli/templates/|lib/cli/src/crewai_cli/templates/|lib/cli/tests/|lib/crewai/tests/|lib/crewai-tools/tests/|lib/crewai-files/tests/|lib/devtools/tests/)
  - repo: https://github.com/astral-sh/uv-pre-commit
    rev: 0.11.3
    hooks:
      - id: uv-lock
  - repo: local
    hooks:
      - id: pip-audit
        name: pip-audit
        # Keep this ignore list in sync with .github/workflows/vulnerability-scan.yml.
        # TODO: drop --ignore-vuln GHSA-8mgp-746c-j5xp when bumping nltk past 3.10.3.
        # TODO: drop --ignore-vuln GHSA-4j2p-28q2-5m79 when bumping accelerate past 1.14.0.
        entry: >-
          bash -c 'case "$OSTYPE" in msys*|cygwin*|win32*) source .venv/Scripts/activate ;; *) source .venv/bin/activate ;; esac && uv run pip-audit --skip-editable
          --ignore-vuln PYSEC-2024-277
          --ignore-vuln PYSEC-2026-89
          --ignore-vuln PYSEC-2026-97
          --ignore-vuln PYSEC-2026-597
          --ignore-vuln PYSEC-2025-148
          --ignore-vuln PYSEC-2025-183
          --ignore-vuln PYSEC-2025-189
          --ignore-vuln PYSEC-2025-190
          --ignore-vuln PYSEC-2025-191
          --ignore-vuln PYSEC-2025-192
          --ignore-vuln PYSEC-2025-193
          --ignore-vuln PYSEC-2025-194
          --ignore-vuln PYSEC-2025-195
          --ignore-vuln PYSEC-2025-196
          --ignore-vuln PYSEC-2025-197
          --ignore-vuln PYSEC-2025-210
          --ignore-vuln PYSEC-2026-139
          --ignore-vuln PYSEC-2025-211
          --ignore-vuln PYSEC-2025-212
          --ignore-vuln PYSEC-2025-213
          --ignore-vuln PYSEC-2025-214
          --ignore-vuln PYSEC-2025-215
          --ignore-vuln PYSEC-2025-216
          --ignore-vuln PYSEC-2025-217
          --ignore-vuln PYSEC-2025-218
          --ignore-vuln GHSA-f4j7-r4q5-qw2c
          --ignore-vuln GHSA-2wm9-hf6c-p5cr
          --ignore-vuln GHSA-36p7-vc44-83pf
          --ignore-vuln GHSA-xph7-9rjv-w5fr
          --ignore-vuln GHSA-8mgp-746c-j5xp
          --ignore-vuln GHSA-4j2p-28q2-5m79' --
        language: system
        pass_filenames: false
        stages: [pre-push, manual]
  - repo: https://github.com/commitizen-tools/commitizen
    rev: v4.10.1
    hooks:
      - id: commitizen
      - id: commitizen-branch
        stages: [ pre-push ]