regro / cf-scripts

Flagship repo for cf-regro-autotick-bot
Other
46 stars 70 forks source link

Remove Black Formatter, replace isort by ruff rules #2826

Closed ytausch closed 2 days ago

ytausch commented 2 days ago

black is not intended to be used next to ruff-format:

Ruff is designed to be used alongside a formatter (like Ruff's own formatter, or Black) and, as such, will defer implementing stylistic rules that are obviated by automated formatting.

In fact, the current pre-commit setup actively prevents me from committing a file where black and ruff format conflict with each other.

This is why I propose to remove black from this project, since we already have ruff-format.

Also, ruff has support for I rules that are comparable with isort. Since isort has no profile for ruff-format (only for black) we should also switch over to using these rules instead of using isort separately.

I would appreciate if we can handle this PR with rather high priority, as it's currently blocking commits (see above). Thank you.

ytausch commented 2 days ago

Thank you!