ci: add automated Ruff linting and formatting - #127
Conversation
Signed-off-by: zhangyuyang <zhangyuyang821@163.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
@abhiksark Before making the CI check required, would you confirm whether you prefer:
|
|
2nd makes more sense. |
|
Thanks for putting together the initial Ruff configuration and contributor documentation. The focused scope, Python 3.9 target, 80-character limit, and development-only dependency all look good. There is one blocker before this can merge: the Please add a non-advisory installation step before the checks, for example: - name: Install development dependencies
run: python -m pip install -e ".[dev]"The two Ruff commands can remain advisory for this incremental phase. After making that change, please update the branch from the current One non-blocking note: the current configuration reports substantial existing debt, including expected shared-namespace errors in |
|
@abhiksark Thanks! I’ve added the development dependency installation step. |
Summary
Related to #124.
This draft adds the initial Ruff configuration, CI checks, and local usage instructions.
While validating the change, I found that applying Ruff repository-wide exposes a large amount of existing style debt. It also reports expected errors in learner exercises, shared-namespace checks, and intentionally invalid test fixtures. I have intentionally not reformatted the repository or added extensive repository-specific exclusions yet, to keep this PR focused.
Tests
zhangyuyang@zhangyuyangdeMacBook-Pro pythonlings % python -m pytest -q .......................................................................................................................................................................... [ 80%] .......................................... [100%] 212 passed in 40.27sScreenshots
Checklist
python -m pytest -q