VSEScala / Scala-Dining

Contains the Scala Dining Website Design
4 stars 5 forks source link

Format everything with black #257

Closed LenaWil closed 1 year ago

LenaWil commented 1 year ago

This is what the pull request would look like.

LenaWil commented 1 year ago

I do really encounter extremely obscure bugs everytime: https://github.com/pre-commit/pre-commit/pull/2890

mhvis commented 1 year ago

I like the consistency very much. The same exact formatting everywhere makes that we only have to focus on functionality instead of formatting. But if @DutcherNL does not like this code style we should not implement this.

I personally am against the use of pre-commit. By running the tools manually it remains transparent what is happening, you learn all capabilities and purposes of the tools and you understand what you are actually committing. That is also why I use git add to explicitly add each changed file instead of just committing everything or using a GUI. The end goal should be to eventually write code in such a way that it is already fully linted. Then the tools are no longer necessary and the GitHub Action will ensure that you did not forget anything.

Having said that, the use of pre-commit is optional so their config files can stay.

LenaWil commented 1 year ago

Yeah, okay, it’s a proof of concept, and I have to say I’m less inclined to use pre-commit at all since discovering that bug.

But we will see what @DutcherNL thinks about it.

LenaWil commented 1 year ago

Okay, I tried to exclude migrations in the amended commits, but forgot some of the migration directories while I was amending one of the earlier once. Anyway, since it’s a lot of effort, do people actually want me to redo it?