Skip to content

Commit e4ec979

Browse files
Prompt users to run pre-commit when detecting ruff failures (#8338)
* add ruff hint * use single quote * revert testing changes
1 parent b30c55c commit e4ec979

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/run_tests.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,18 @@ jobs:
3232
echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH
3333
- name: Install dependencies
3434
run: uv sync --dev -p .venv --extra dev
35-
- name: Ruff Fix Attempt
36-
id: ruff_fix
37-
run: ruff check --fix-only --diff --exit-non-zero-on-fix
35+
- name: Ruff Check
36+
run: |
37+
ruff check --fix-only --diff --exit-non-zero-on-fix || (
38+
echo ""
39+
echo "❌ Ruff found issues that can be fixed automatically."
40+
echo "💡 To fix them locally, run:"
41+
echo ""
42+
echo " pre-commit run --all-files"
43+
echo ""
44+
echo "Then commit and push the changes."
45+
exit 1
46+
)
3847
3948
test:
4049
name: Run Tests

dspy/clients/cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def __init__(
3030
disk_cache_dir: str,
3131
disk_size_limit_bytes: Optional[int] = 1024 * 1024 * 10,
3232
memory_max_entries: Optional[int] = 1000000,
33+
3334
):
3435
"""
3536
Args:

0 commit comments

Comments
 (0)