Uh oh!
There was an error while loading. Please reload this page.
format code via black - #713
Conversation
dwalton76
commented
Jan 12, 2020
Hmm this is a very large patch...9200 lines |
WasabiFan
commented
Jan 13, 2020
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. |
dwalton76
commented
Jan 13, 2020
On the flip side...
I could go either way but am leaning towards "lets do it and be done with it". |
dlech
commented
Jan 13, 2020
Or use yapf instead of black and stick with single quotes |
dwalton76
commented
Jan 15, 2020
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. |
dwalton76
commented
Jan 15, 2020
For comparison the yapf patch is 4300 lines...so still significant |
WasabiFan
commented
Jan 19, 2020
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). |
dwalton76
commented
Jan 19, 2020
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. |
WasabiFan
commented
Jan 20, 2020
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. |
dwalton76
commented
Jan 20, 2020
We formatted via yapf instead |
No description provided.