fix: restore correct src/ paths in pre-commit config for main branch

When backporting from release branch, I changed paths from src/llama_stack
to llama_stack. Main branch still uses src/ structure, so ruff exclude and
file patterns need to match that.
This commit is contained in:
Ashwin Bharambe 2025-10-31 12:03:08 -07:00
parent bbaed611b2
commit 5882242a7e

View file

@ -42,7 +42,7 @@ repos:
hooks:
- id: ruff
args: [ --fix ]
exclude: ^llama_stack/strong_typing/.*$
exclude: ^src/llama_stack/strong_typing/.*$
- id: ruff-format
- repo: https://github.com/adamchainz/blacken-docs
@ -91,7 +91,7 @@ repos:
language: python
pass_filenames: false
require_serial: true
files: ^llama_stack/distributions/.*$|^llama_stack/providers/.*/inference/.*/models\.py$
files: ^src/llama_stack/distributions/.*$|^src/llama_stack/providers/.*/inference/.*/models\.py$
- id: provider-codegen
name: Provider Codegen
additional_dependencies:
@ -100,7 +100,7 @@ repos:
language: python
pass_filenames: false
require_serial: true
files: ^llama_stack/providers/.*$
files: ^src/llama_stack/providers/.*$
- id: openapi-codegen
name: API Spec Codegen
additional_dependencies:
@ -109,7 +109,7 @@ repos:
language: python
pass_filenames: false
require_serial: true
files: ^llama_stack/apis/|^docs/openapi_generator/
files: ^src/llama_stack/apis/|^docs/openapi_generator/
- id: check-workflows-use-hashes
name: Check GitHub Actions use SHA-pinned actions
entry: ./scripts/check-workflows-use-hashes.sh
@ -125,7 +125,7 @@ repos:
pass_filenames: false
require_serial: true
always_run: true
files: ^llama_stack/.*$
files: ^src/llama_stack/.*$
- id: forbid-pytest-asyncio
name: Block @pytest.mark.asyncio and @pytest_asyncio.fixture
entry: bash
@ -155,7 +155,7 @@ repos:
name: Format & Lint UI
entry: bash ./scripts/run-ui-linter.sh
language: system
files: ^llama_stack/ui/.*\.(ts|tsx)$
files: ^src/llama_stack/ui/.*\.(ts|tsx)$
pass_filenames: false
require_serial: true