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

Introduce ruff as a Python linter #82

Merged
merged 1 commit into from
Jan 30, 2024
Merged

Introduce ruff as a Python linter #82

merged 1 commit into from
Jan 30, 2024

Conversation

rjhuijsman
Copy link
Contributor

@rjhuijsman rjhuijsman commented Jan 29, 2024

The ruff linter has support for checks that some of our existing linters don't, most notably the ability to detect (and fix, if requested) unused imports. Unused imports are a cause of many PR comments and wasted time.

ruff is also a code formatter, but there's currently no strong reason to switch from yapf to ruff for that in our codebase, so we only run ruff check (linting) and not ruff format (formatting).

See https://github.com/reboot-dev/respect/pull/2264 for an example of fixes that ruff prompts for.

@rjhuijsman rjhuijsman self-assigned this Jan 29, 2024
Copy link

aviator-app bot commented Jan 29, 2024

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged using Aviator.


See the real-time status of this PR on the Aviator webapp.

Use the Aviator Chrome Extension to see the status of your PR within GitHub.

The `ruff` linter has support for checks that some of our existing
linters don't, most notably the ability to detect (and fix, if
requested) unused imports. Unused imports are a cause of [many PR
comments](reboot-dev/mono#2159) and wasted
time.

`ruff` is also a code formatter, but there's currently no strong reason
to switch from `yapf` to `ruff` for that in our codebase.
Copy link
Contributor

@while-false while-false left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aviator-app aviator-app bot merged commit 276c313 into main Jan 30, 2024
1 check passed
@aviator-app aviator-app bot deleted the rjh.add-ruff branch January 30, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants