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
I find flake8 errors to be confusing to fix at times. For example, I've expended more mental energy than I care to admit trying to figure out how to turn an 81 character line into two lines. This feels like it makes more difficult to contribute to matplotlib, especially for someone who hasn't gone to the trouble of setting up an ide to point out flake8 errors. More difficult both through the extra mental effort and the extra back and forth about formatting on PRs.
Proposed Solution
Autoformat all code using black. This would remove the mental burden of formatting by having contributors only need to run:
black .
Additional context and prior art
Plunging the depths for flake8 commits: (those that never got squashed)
Problem
I find flake8 errors to be confusing to fix at times. For example, I've expended more mental energy than I care to admit trying to figure out how to turn an 81 character line into two lines. This feels like it makes more difficult to contribute to matplotlib, especially for someone who hasn't gone to the trouble of setting up an ide to point out flake8 errors. More difficult both through the extra mental effort and the extra back and forth about formatting on PRs.
Proposed Solution
Autoformat all code using black. This would remove the mental burden of formatting by having contributors only need to run:
Additional context and prior art
git log --all | grep "flake" -c -i169
git log --all | grep "fix.*format" -c -i259
If done in a single commit then the commit can be saved in
git-blame-ignore-revsto avoid messing up git blame (though I suppose it may be messed up on github :/ )https://black.readthedocs.io/en/stable/installation_and_usage.html#migrating-your-code-style-without-ruining-git-blame
We did this on jupyterlab-git (Format code using black jupyterlab/jupyterlab-git#763) and it has sparked me trying to use this everywhere I can