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 instead of Black/isort/Flake8 #26

Merged
merged 1 commit into from
Mar 25, 2024
Merged

Conversation

sisp
Copy link
Contributor

@sisp sisp commented Mar 25, 2024

I've replaced Black, isort, and Flake8 by Ruff.

Ruff's config enables all linters except those that (a) would require manual changes to the code (which we can enable and resolve separately) or (b) conflict with Ruff's formatter. Regarding (b), I exclude the minimum set of rules such that the following statement in the docs holds:

When an incompatible lint rule or setting is enabled, ruff format will emit a warning. If your ruff format is free of warnings, you're good to go!

I went for pinning Ruff's version because every release may change Ruff's expectations, so IMO we should update Ruff deliberately and resolve errors in the process. WDYT?

Closes #15 as a side-effect of removing Black.

@sisp sisp force-pushed the ruff branch 2 times, most recently from 3b84575 to 201d823 Compare March 25, 2024 10:17
@sisp sisp changed the title Use Ruff instead of Black and Flake8 Use Ruff instead of Black/isort/Flake8 Mar 25, 2024
@sisp
Copy link
Contributor Author

sisp commented Mar 25, 2024

I think this PR is ready for a review now (after a few iterations 😉).

@timofurrer
Copy link
Member

@sisp looks good to me! Thank you!

@timofurrer timofurrer merged commit b8f7e01 into click-contrib:master Mar 25, 2024
6 checks passed
@sisp sisp deleted the ruff branch March 25, 2024 10:30
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.

black requirement too restrictive
2 participants