CAVEconnectome/CAVEclient

Standardize code formatting?

Closed this issue · 4 comments

Spinning off conversation from #167

I propose using ruff as an autoformatter and enforcing this in the tests.

Upside is fewer formatting-based diffs on PRs and cleaner looking code IMO.

Downside is an annoyance when tests fail just because you didn't run autoformatting. I think this can be alleviated by using pre commit hooks or just setting up code editor to run it automatically on save.

cc: @ceesem

Happy with moving to ruff, but would prefer to enforce with a GitHub action if possible rather than tests.

yeah i meant a github action that would check with ruff

I mean I'd rather it just do the formatting than test agains it. If it would fail tests otherwise, why not just let the tool fix it.

Closed by #170