Closed dwalton76 closed 4 years ago
Wow, yeah, that's pretty big!
Although I am rather fond of keeping style consistent and using these tools, I feel like in this case the sheer amount of stuff that would change makes it not worth it. It makes blames/diffs/history searching hard for a relatively small benefit. I think we should leave the formatting inconsistent unless there's another compelling reason to change so much.
On the flip side...
I could go either way but am leaning towards "lets do it and be done with it".
Or use yapf instead of black and stick with single quotes
I hadn't heard of yapf but it looks worth a try. I'll post another PR using yapf and we can compare the diff for it vs black.
For comparison the yapf patch is 4300 lines...so still significant https://github.com/ev3dev/ev3dev-lang-python/pull/716
OK, I'm up for formatting. I do prefer the yapf results just because it modifies less code.
If that's the one we're going to go with, can you add it (asserting matching style) to the TravisCI scripts? It can probably go in the CPython-only build (as opposed to micropython).
If that's the one we're going to go with, can you add it (asserting matching style) to the TravisCI scripts? It can probably go in the CPython-only build (as opposed to micropython).
We should be able to do a pre-commit hook that verifies the style is correct, that way the user can't even commit it if the style is wrong.
I generally prefer to avoid commit hooks... Commits are free and easily squashable backups, and I don't want something like a style check to get in the way of that. Being able to quickly push half-baked changes then pull them from another machine and amend your work there is very useful. I'd also rather not have to fight cross-platform scripting issues.
We formatted via yapf instead
Hmm this is a very large patch...9200 lines