chore: TETRA-2181 — ruff baseline về 0 + gate full ruff check #166
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/TETRA-2181-ruff-baseline-zero"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Đưa ruff baseline toàn repo vhrms 582 → 0 và đổi CI gate từ
ruff check --select S110sang fullruff check .(chặn regression). Follow-up của TETRA-2134.Cách làm
RUF001/002/003— ký tự Unicode tiếng Việt trong string/docstring/comment là CỐ Ý (≈247 lỗi).--unsafe-fixescho rule cơ học (I001 import-sort, RUF100, UP015/030/032, RUF005/010/012/013/022/034, B007/B905, F841...) — ≈300 lỗi. F841-fix giữ nguyên các call có side-effect (frappe.db.sql,sys.modules.setdefault), chỉ bỏ binding._trùng gettext_(F402), ClassVar cho mutable class attr test (RUF012).isinstance(x,(A,B))→isinstance(x, A|B)— hợp lệ py3.10; rule này ruff mới đã bỏ nhưng 0.8.1 (CI pin) còn → fix để clean cả 2 version..forgejo/workflows/test.yml: gate fullruff check ..Test Plan
ruff check .= 0 dưới CẢ ruff 0.8.1 (CI pin) lẫn 0.15.17 (latest)150 files (phần lớn là I001 import-sort autofix), net −111 dòng.
🤖 Generated with Claude Code