Skip to content

Commit 311d01b

Browse files
andrewor14amdfaa
authored andcommitted
Clarify how users should fix ruff errors (#1416)
Before: ``` Would reformat: test/quantization/test_qat.py Would reformat: torchao/quantization/qat/api.py 2 files would be reformatted, 138 files already formatted ``` After: ``` Would reformat: test/quantization/test_qat.py Would reformat: torchao/quantization/qat/api.py 2 files would be reformatted, 138 files already formatted Ruff check failed, please try again after running 'ruff format'. ```
1 parent 473799a commit 311d01b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/ruff_linter.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ jobs:
7070
# please be careful when using this large changes means everyone needs to rebase
7171
ruff check --isolated --select F821,F823,W191
7272
ruff check --select F,I
73-
ruff format --check
73+
ruff format --check || {
74+
echo "Ruff check failed, please try again after running 'ruff format'."
75+
exit 1
76+
}
7477
7578
- name: Apply fixes to PR
7679
if: github.event_name == 'workflow_dispatch'

0 commit comments

Comments
 (0)