You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Title says it all-I REALLY think this project needs consistent and enforced formatting rules, just for contributors' sanity sake.
I get why it hasn't been enforced yet-probably because we don't want to create all that noise in git blame from formatting changes. But remember, git blame provides the -w option, which ignores commits that only change whitespace.
Additionally, the current codebase is filled with aligned variable assignments. Sure, it might make the code look nicer at first glance, but it creates a lot of noise when we add a longer variable name. Take a look at this example:
this_is_a_variable=1another_variable=2
If we want to add a longer variable, we have to modify multiple lines just to re-align them correctly:
This thing alone creates a lot of unnecessary noise in the commit history, - that's why I see little to no reason to continue using the current formatting style. I suggest adopting Black as our formatter-it should create the least amount of noise while reformatting the project's files. In fact, the project was formatted once using Black in this commit, but that was almost a year ago. Since then, the project's formatting has degraded over time into the chaotic mess we have now.
That's why I think it would be a good idea to enforce consistent formatting using GitHub Actions. We could set it up to trigger on every pull request and automatically format the code using Black if it's not formatted already. This way, we'd have consistent formatting for years to come.
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Description
Title says it all-I REALLY think this project needs consistent and enforced formatting rules, just for contributors' sanity sake.
I get why it hasn't been enforced yet-probably because we don't want to create all that noise in
git blame
from formatting changes. But remember,git blame
provides the-w
option, which ignores commits that only change whitespace.Additionally, the current codebase is filled with aligned variable assignments. Sure, it might make the code look nicer at first glance, but it creates a lot of noise when we add a longer variable name. Take a look at this example:
If we want to add a longer variable, we have to modify multiple lines just to re-align them correctly:
This thing alone creates a lot of unnecessary noise in the commit history, - that's why I see little to no reason to continue using the current formatting style. I suggest adopting Black as our formatter-it should create the least amount of noise while reformatting the project's files. In fact, the project was formatted once using Black in this commit, but that was almost a year ago. Since then, the project's formatting has degraded over time into the chaotic mess we have now.
That's why I think it would be a good idea to enforce consistent formatting using GitHub Actions. We could set it up to trigger on every pull request and automatically format the code using Black if it's not formatted already. This way, we'd have consistent formatting for years to come.
Code of Conduct
The text was updated successfully, but these errors were encountered: