lina-usc / pylossless

🧠 EEG Processing pipeline that annotates continuous data
https://pylossless.readthedocs.io/en/latest/
MIT License
15 stars 8 forks source link

MAINT: Use black? #133

Closed scott-huberty closed 10 months ago

scott-huberty commented 1 year ago

black is an auto formatter that the community seems to be converging around (pandas, numpy and scikit adopted it; heck it's even hosted on python's github homepage)..

I've heard about black for a while but now mne is using it so i've got a first hand look. Here's my take:

Benefits:

downsides:

Sometimes I prefer the way I style my code only to have black automatically reformat it according to it's ethos, but honestly I can live with that, because, it's so consistent and I don't have to worry about fixing flakes.

Overall I'm +1 on switching to black and using a pre-commit hook so that that flakes are caught/fixed before a PR is ever opened (No more CI's yelling at me because I forgot to format something correctly).

We are a small project so I wasn't super pressed to switch to black, but right now in my VScode I have to turn black on and off when I switch between mne and pylossless (otherwise black would automatically format my pylossless files when I save them.).. So i'm tempted to push us to switch to black now so that I don't have to turn it off and on ; )

I can volunteer to set it up and help format our current files to black standard now so others don't have to.