Repository navigation
ci: add ruff linting to CI and pyproject.toml - #6
faizan-7890 wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @dhyanamgit, The required contributor agreement line from
All Ruff lint checks pass cleanly with 0 errors, and the unit test suite passes. Ready for your review and merge whenever you have a moment! Thank you! |
|
Implemented and verified. Ruff is configured in pyproject.toml, added to the development/test dependencies, and runs in CI via |
Closes #3
Summary
This PR adds Ruff linting configuration and integrates a lint check step into GitHub Actions CI, addressing all requirements in #3.
Changes
pyproject.toml:[tool.ruff]section targetingpy310withline-length = 120.[tool.ruff.lint]selecting["E", "F", "W"](pycodestyle errors, pyflakes, and pycodestyle warnings).E501(line length > 120): Long string literals, URLs, and SOAP XML envelopes.E702(multiple statements on one line with semicolon): Common pattern across test fixtures (await a.close(); await b.close()).E731(lambda assignment): Used in tests for short mock callables.E402(module level import not at top of file): Used intentionally insignaling.pyto resolve circular imports.E741(ambiguous variable name): Single-letter iterator variables (lin list comprehensions).ruff>=0.4to[project.optional-dependencies]underdev.tests/requirements-test.txt:ruff>=0.4so test environments include the linter out of the box..github/workflows/tests.yml:run: ruff check .step in theunittest matrix job right before runningpytest.F401) and 4 unused local variables (F841) acrosssrc/andtests/so thatruff check .completes with zero errors out of the box.CHANGELOG.md:## Unreleaseddocumenting the addition of Ruff linting to CI.Verification
ruff check .locally — All checks passed (0 errors).pytest— 144 passed.Contributor Agreement