@ljchang One issue that's a bit annoying is we haven't enforced a particular code-formatting style for the library. We very loosely adhere to pycodestyle, but it's not consistent across the library. This obviously doesn't change functionality but a few reasons to do this are:
Easier to debug errors because code is more readable
Without enforced code-style, IDEs like vscode/atom will complain about code style warnings making it annoying to separate actual errors from style errors
If some of us format a contribution and others don't, git diffs light up everywhere for non-meaningful changes to formatting, making it nearly impossible to sift through and find actual feature changes/bug-fixes
A popular option that is used in several other libraries and one I use myself for other projects is black. It's very simple to use (no configuration), adheres to PEP 8, and can very simply format an entire file within your editor with a single shortcut.
I thought I had introduced a commit in an old PR that reformatted the entire library for everyone, but looks like it got overwritten in one of your or someone else's PRs. I had to refork the entire library as a result of this because I couldn't make sense of what changes were happening where.
If we go with this, then we can add a "how to contribute" page so future PRs know to format their contributions.
@ljchang One issue that's a bit annoying is we haven't enforced a particular code-formatting style for the library. We very loosely adhere to pycodestyle, but it's not consistent across the library. This obviously doesn't change functionality but a few reasons to do this are:
A popular option that is used in several other libraries and one I use myself for other projects is black. It's very simple to use (no configuration), adheres to PEP 8, and can very simply format an entire file within your editor with a single shortcut.
I thought I had introduced a commit in an old PR that reformatted the entire library for everyone, but looks like it got overwritten in one of your or someone else's PRs. I had to refork the entire library as a result of this because I couldn't make sense of what changes were happening where.
If we go with this, then we can add a "how to contribute" page so future PRs know to format their contributions.