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

Adopt Ruff #73

Merged
merged 8 commits into from
Mar 1, 2024
Merged

Adopt Ruff #73

merged 8 commits into from
Mar 1, 2024

Conversation

chris48s
Copy link
Collaborator

@chris48s chris48s commented Jan 26, 2024

Why not? All the cool kids are doing it 😎

Closes #58

This PR replaces

  • isort
  • flake8
  • flake8-bugbear
  • flake8-comprehensions
  • black
  • blacken-docs

with ruff, and provides a very similar ruff config to what we previously had for those tools.

In this PR, I have stuck to doing everything with pre-commit hooks and no local installs. I am not making the switch away from hook repos to using "local" here, just to keep the scope constrained. I do plan to do that, but it is another issue for another day.

@chris48s chris48s changed the title WIP Adopt Ruff Jan 26, 2024
@zerolab
Copy link
Collaborator

zerolab commented Jan 26, 2024

@chris48s what do you think of adding a separate ruff workflow like https://github.com/torchbox/wagtail-bynder/blob/main/.github/workflows/ruff.yml -- this will add handy inline annotations on the PR should there be failures

@chris48s
Copy link
Collaborator Author

what do you think of adding a separate ruff workflow like...

Sounds like a reasonable improvement. It requires us to drop the "delegate all linter management to pre-commit" thing and install our tools in the local environment first, which I do plan to deal with, but I think should be another issue - as stated in the top post. I don't think we need to do all that in this PR for it to be worth merging.

Copy link
Collaborator

@zerolab zerolab left a comment

Choose a reason for hiding this comment

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

A few tidy ups and this is good to go

chris48s and others added 4 commits March 1, 2024 12:12
Co-authored-by: Dan Braghiș <dan@zerolab.org>
…ect_name_snake }}/test/settings.py

Co-authored-by: Dan Braghiș <dan@zerolab.org>
@chris48s chris48s merged commit 4a90e0f into main Mar 1, 2024
8 checks passed
@chris48s chris48s deleted the 58-ruff branch March 1, 2024 12:22
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.

Replace isort/flake8 with ruff
2 participants