chore: ruff 린터 + pre-commit 훅 도입 #32

Merged
xhh merged 2 commits from chore/ruff-precommit into main 2026-04-22 03:22:39 +09:00
Owner

Summary

  • ruff + pre-commit 을 dev 의존성에 추가, pyproject.toml 에 rule set 정의
  • .pre-commit-config.yaml: ruff-check --fix 를 커밋 훅으로 등록 (format 은 의도적 제외)
  • .forgejo/workflows/test.yml: pytest 직전에 uv run ruff check . 추가
  • 자동 수정 134건 적용 후 전체 ruff clean + 41 tests 통과
  • CLAUDE.md 에 ruff/pre-commit 가이드 섹션 추가

Test plan

  • uv run ruff check . 통과
  • uv run pytest 41 passed
  • uv run pre-commit install 후 실제 커밋에서 훅 동작 확인
  • CI 가 ruff + pytest 둘 다 초록불

로컬 훅 활성화: uv run pre-commit install (최초 1회)

## Summary - ruff + pre-commit 을 dev 의존성에 추가, pyproject.toml 에 rule set 정의 - .pre-commit-config.yaml: ruff-check --fix 를 커밋 훅으로 등록 (format 은 의도적 제외) - .forgejo/workflows/test.yml: pytest 직전에 `uv run ruff check .` 추가 - 자동 수정 134건 적용 후 전체 ruff clean + 41 tests 통과 - CLAUDE.md 에 ruff/pre-commit 가이드 섹션 추가 ## Test plan - [x] `uv run ruff check .` 통과 - [x] `uv run pytest` 41 passed - [x] `uv run pre-commit install` 후 실제 커밋에서 훅 동작 확인 - [ ] CI 가 ruff + pytest 둘 다 초록불 로컬 훅 활성화: `uv run pre-commit install` (최초 1회)
chore: ruff 린터 + pre-commit 훅 도입
All checks were successful
Tests (PR) / pytest (pull_request) Successful in 25s
e9d903211b
코드 품질 게이트를 커밋 단계에서 강제한다.

추가
----
- ruff (>=0.15.11) + pre-commit (>=4.5.1) 을 dev 의존성에 추가
- pyproject.toml [tool.ruff]: target py313, line 100
  - select: E W F I B UP SIM
  - ignore: E501 / B011 / SIM108 / SIM102 / SIM105
  - per-file-ignores: tests / scripts / frontend 별로 완화
- .pre-commit-config.yaml: ruff-check --fix 를 커밋 훅으로 등록
  (ruff-format 은 44 파일 전면 재포맷이 필요해 이번 스코프에서 제외)
- .forgejo/workflows/test.yml: pytest 전에 ruff check 를 CI 단계로 추가
- CLAUDE.md: "코드 품질: ruff + pre-commit (필수)" 섹션

자동 수정 결과
-------------
- 134개 위반 자동 수정 (주로 I001 import 정렬, UP 업그레이드, F401 미사용 import)
- 한 곳만 수동 수정: collection_utils.py 의 사용 안 하는 loop 변수 `_` 프리픽스
- 41 tests 전체 통과, ruff 전체 통과

로컬 훅 활성화: `uv run pre-commit install` (최초 1회)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
xhh force-pushed chore/ruff-precommit from e9d903211b
All checks were successful
Tests (PR) / pytest (pull_request) Successful in 25s
to 1f7cb15105
All checks were successful
Tests (PR) / pytest (pull_request) Successful in 25s
2026-04-22 03:22:00 +09:00
Compare
xhh merged commit 5d22fb63eb into main 2026-04-22 03:22:39 +09:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
xhh/financial-data-platform!32
No description provided.