mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-11 19:56:03 +00:00
fix: skip mypy gracefully if not available on release branch
The mypy check doesn't exist on release-0.3.x. Detect when mypy fails to spawn and treat it as a pass with a warning.
This commit is contained in:
parent
51f3aeb479
commit
d63e2e4060
1 changed files with 9 additions and 1 deletions
10
.github/workflows/pre-commit.yml
vendored
10
.github/workflows/pre-commit.yml
vendored
|
|
@ -165,8 +165,16 @@ jobs:
|
|||
- name: Run mypy (full type checking)
|
||||
run: |
|
||||
set +e
|
||||
$MYPY_CMD
|
||||
output=$($MYPY_CMD 2>&1)
|
||||
status=$?
|
||||
|
||||
# If mypy isn't available (common on older release branches), skip gracefully
|
||||
if echo "$output" | grep -q "Failed to spawn.*mypy"; then
|
||||
echo "::warning::mypy not available, skipping type checking (expected on release-0.3.x)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "$output"
|
||||
if [ $status -ne 0 ]; then
|
||||
echo "::error::Full mypy failed. Reproduce locally with 'uv run pre-commit run mypy-full --hook-stage manual --all-files'."
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue