dizballanze / gray

Less uncompromising Python code formatter
MIT License
75 stars 8 forks source link

Clarify the differences between gray and black #3

Open rec opened 4 years ago

rec commented 4 years ago

I'm interesting in switching but there is not enough information to evaluate whether I should!

Thanks for your work on this promising package.

Gideon-Felt commented 3 years ago

I'd love to see some examples between the two.

sodul commented 7 months ago

Support for black was added in gray v0.10.0 (June 2021), as an optional formatter. With this it makes it easier to not have to pick between the two.

One main difference is that if you use gray with black and unify, you can then have single quotes instead of double quotes.

Other than that it really depends on which other formatters your use as gray itself does not format code directly, and you can refer to the documentation of each formatter.