digitalmethodsinitiative / 4cat

The 4CAT Capture and Analysis Toolkit provides modular data capture & analysis for a variety of social media platforms.
Other
260 stars 61 forks source link

Choose a consistent coding style #262

Open stijn-uva opened 2 years ago

stijn-uva commented 2 years ago

As more developers are contributing to 4CAT, the chance of mixing up different code styles increases and this can be inconvenient or confusing.

I propose we adopt Black for 4CAT, and then we don't have to worry about this anymore :-)

sal-uva commented 2 years ago

I'll have to say goodbye to my beloved tabs but sounds like a good idea 👍

dale-wahl commented 2 years ago

It sounds nice to have that handled for us to some degree. I'm curious to see how it works in practice. I'll read up on Black.

dale-wahl commented 2 years ago

Black is beautiful.

Have you run it on 4CAT? You should and just see all the lovely formatted functions and loops and returns. The number of diffs is a little bit of a slap on the wrist to our own styles but, hey, it's to be expected. I'd miss tabs, but all my IDEs convert my tabs to spaces anyway.

I built a docker version off it and nothing crashed (that's my base level of testing/approval).

stijn-uva commented 2 months ago

Branch for seeing if we can live with it: https://github.com/digitalmethodsinitiative/4cat/tree/blackened