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

Use ruff to auto-format code and sort imports. #566

Merged
merged 9 commits into from
Jul 1, 2024
Merged

Use ruff to auto-format code and sort imports. #566

merged 9 commits into from
Jul 1, 2024

Conversation

dandavison
Copy link
Contributor

@dandavison dandavison commented Jun 28, 2024

Use ruff to auto-format code and sort imports. This PR does not switch to using ruff as a general Python linter.

After merge, we could add the commit to https://git-scm.com/docs/git-blame#Documentation/git-blame.txt-blameignoreRevsFile

@dandavison dandavison requested a review from a team as a code owner June 28, 2024 11:00
@dandavison dandavison marked this pull request as draft June 28, 2024 11:20
@dandavison dandavison marked this pull request as ready for review July 1, 2024 11:45
@dandavison
Copy link
Contributor Author

Ready for review, except for the failing 3.8 ubuntu-latest which seems to be autoformatting generated protos and I haven't worked out why yet.

Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

Nice

pyproject.toml Outdated Show resolved Hide resolved
@cretz
Copy link
Member

cretz commented Jul 1, 2024

In addition to the comment about formatting generated protos, I also wonder if ruff can help us detect unused imports (haven't researched). I know imports have side-effects but surely there's some comment we can put around the false positives.

@dandavison dandavison merged commit 38d9eef into main Jul 1, 2024
12 checks passed
@dandavison dandavison deleted the ruff branch July 1, 2024 15:02
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.

2 participants