Skip to content

ci: add Ruff config and GitHub Actions lint workflow#338

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

ci: add Ruff config and GitHub Actions lint workflow#338
korbonits wants to merge 1 commit into
microsoft:mainfrom
korbonits:ci/ruff-precommit-and-actions

Conversation

@korbonits
Copy link
Copy Markdown

Summary

  • Add [tool.ruff] config to pyproject.toml (E/F/I rules, 120-char line length, per-file ignores for __init__.py)
  • Add .github/workflows/lint.yml using uv for fast installs
  • Auto-fix 178 violations (unsorted imports, unused imports, f-string placeholders, multiple imports on one line, useless semicolons)
  • Add # noqa: F401 to two intentional availability-probe imports in demo/vibevoice_asr_inference_from_file.py (torchcodec, flash_attn)

Note: .pre-commit-config.yaml is excluded from this PR — it's listed in .gitignore, so pre-commit appears to be an intentional non-requirement for this project.

Motivation

No linting or CI exists today. This PR adds lightweight, zero-friction enforcement using Ruff (fast, no extra dependencies beyond uv pip install ruff in CI).

What's not included

  • No pre-commit hooks (respecting existing .gitignore exclusion)
  • No type checking — out of scope
  • No new lint rules beyond E/F/I selection

Testing

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

- Add [tool.ruff] config to pyproject.toml (E/F/I rules, 120-char limit,
  per-file ignores for __init__.py)
- Add .github/workflows/lint.yml using uv for fast installs
- Auto-fix 178 violations (unsorted imports, unused imports, f-strings,
  multiple imports on one line, useless semicolons)
- Add noqa: F401 to two intentional availability-probe imports in
  demo/vibevoice_asr_inference_from_file.py (torchcodec, flash_attn)

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