Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Style #6

Closed
ulgens opened this issue Mar 1, 2022 · 4 comments · Fixed by #8
Closed

Code Style #6

ulgens opened this issue Mar 1, 2022 · 4 comments · Fixed by #8

Comments

@ulgens
Copy link
Contributor

ulgens commented Mar 1, 2022

I was thinking of adding black as code formatter but wanted to ask before creating the PR. @hahey @hartwork does it sound fine?

@hartwork
Copy link
Owner

hartwork commented Mar 1, 2022

After comparing Black with other tools, it became apparent that the results of yapf are often more readable than Black's and that Black wastes a lot of vertical space without paying back strong enough value. Also, while having projects consistent across the ecosystem is an interesting idea, Black fixes the "wrong problem", because readability is key, not consistency across projects. So if I have a choice, I'd welcome yapf (or something like it), but vote against Black myself.

@hartwork
Copy link
Owner

hartwork commented Mar 1, 2022

And here's the yapf config that's in use today: https://github.com/git-big-picture/git-big-picture/blob/master/.style.yapf

@ulgens
Copy link
Contributor Author

ulgens commented Mar 1, 2022

it became apparent that the results of yapf are often more readable than Black's and that Black wastes a lot of vertical space without paying back strong enough value.

I think this is highly subjective but I don't see any value in discussing it with the current contributor count. I don't have strong opinions about both tools. If you think yapf is okay with the config you shared, I can apply it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants