Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python] add ruff linting support and exclude outdated flake8 rules #26264

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

machshev
Copy link

Add support for Ruff linting checks (https://github.com/astral-sh/ruff). This allows contributors to use ruff and ruff lsp and pass the CI linting checks.

The default Ruff config doesn't fully cover some of the flake8 rules we run in CI, so they need explicitly enabling. The only clash I can find at the moment is the flake8 rule W503 which is deprecated as it now goes against the current PEP8 recommendations (updated 2016). The flake8 config is therefore updated to disable the check.

@machshev machshev requested review from jwnrt, nbdd0121 and HU90m February 12, 2025 11:14
@machshev machshev requested a review from rswarbrick February 12, 2025 12:38
@machshev machshev force-pushed the python_linting branch 2 times, most recently from 0cac5c4 to c1ebf3d Compare February 12, 2025 12:45
@machshev machshev requested a review from nbdd0121 February 12, 2025 13:01
@jwnrt
Copy link
Contributor

jwnrt commented Feb 13, 2025

We can consider running Ruff in CI in the future, but I think it's basically fine to merge this config now.

@jwnrt jwnrt merged commit 8ec9004 into lowRISC:master Feb 13, 2025
42 checks passed
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.

3 participants