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

Replace black with ruff format #1662

Open
yaugenst-flex opened this issue May 2, 2024 · 2 comments
Open

Replace black with ruff format #1662

yaugenst-flex opened this issue May 2, 2024 · 2 comments
Assignees

Comments

@yaugenst-flex
Copy link

Since ruff format has had feature parity with black for a while now, it might be nice to move away from black because 1. speed and 2. one less dependency.

@so-rose
Copy link

so-rose commented May 14, 2024

A humble perspective from the wilds: It's very, very good. ruff fmt also allows single-quote/tabs; subjectively, that's already reason enough, before the speed comes into play.

Just mind the conflicting rules leading to non-deterministic output. The docs recommend all kinds of stuff, generally I've found these are sufficient:

ignore = [
	"COM812",  # Conflicts w/Formatter
	"ISC001",  # Conflicts w/Formatter
	"Q000",  # Conflicts w/Formatter
	"Q001",  # Conflicts w/Formatter
	"Q002",  # Conflicts w/Formatter
	"Q003",  # Conflicts w/Formatter
	"D206", # Conflicts w/Formatter
...
]

Here's my current pyproject.toml ignorelist for reference.

Hope it can help!

@tylerflex
Copy link
Collaborator

Thanks @so-rose !

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

No branches or pull requests

3 participants