svthalia / concrexit

Thalia Website built on Django.
https://thalia.nu
Other
22 stars 12 forks source link

Switch to ruff for formatting #3817

Open DeD1rk opened 4 days ago

DeD1rk commented 4 days ago

What?

ruff has a formatter and import sorter that is much faster than black and isort. I think it would be nice to switch to that.

Why?

Nicer dev experience.

How?

ColonelPhantom commented 2 days ago

Sounds good, will there be any differences between the style black uses and what ruff will do?

DeD1rk commented 1 day ago

Here's an overview of the differences from black: https://docs.astral.sh/ruff/formatter/black/. I get 7-9 lines in total.

ColonelPhantom commented 9 hours ago

Differences seem pretty small, nice! That said I do get 142 files changed (+200, -68) when I run ruff format, mostly because of an extra newline before imports. When I ignore the files with only 1 line changed I get 12 files.