Skip to content

ci: add Ruff config, pre-commit hooks, and GitHub Actions lint workflow#7

Open
korbonits wants to merge 1 commit intoOsilly:mainfrom
korbonits:ci/ruff-precommit-and-actions
Open

ci: add Ruff config, pre-commit hooks, and GitHub Actions lint workflow#7
korbonits wants to merge 1 commit intoOsilly:mainfrom
korbonits:ci/ruff-precommit-and-actions

Conversation

@korbonits
Copy link
Copy Markdown

Summary

  • Add [tool.ruff] config to pyproject.tomlruff was already in dev dependencies but had no configuration
  • Add .pre-commit-config.yaml wiring up Ruff lint + format hooks — pre-commit was already in dev dependencies but had no config file
  • Add .github/workflows/lint.yml using uv for fast installs
  • Auto-fix 127 violations (unsorted imports, unused imports, f-string placeholders)
  • Fix duplicate save_json definition in SFT/eval/vlm/eval/mmmu/data_utils.py (F811)

Motivation

pyproject.toml already declared both ruff and pre-commit as dev dependencies, signaling intent to set up tooling — this PR completes that setup. No new rules were introduced beyond a standard E/F/I selection; conservative ignores (E501, E402, E722, etc.) keep the config non-intrusive.

What's not included

  • No type checking (ty/mypy) — out of scope
  • No test runner changes — left as-is
  • No new lint rules beyond the initial selection

Testing

Ran ruff check . and ruff format --check . locally — all checks pass.

ruff and pre-commit were already declared as dev dependencies but never
configured. This PR wires them up:

- Add [tool.ruff] config to pyproject.toml (E/F/I rules, 120-char limit,
  per-file ignores for __init__.py)
- Add .pre-commit-config.yaml with ruff lint + format hooks
- Add .github/workflows/lint.yml using uv for fast installs
- Auto-fix 127 violations (unsorted imports, unused imports, f-strings)
- Fix duplicate save_json definition in data_utils.py (F811)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant