invent
invent copied to clipboard
Add black and flake8 to pre-commit, and run it in GitHub Actions
The easiest way to make sure the code stays compliant with black and flake8 is to give the repository a pre-commit configuration, so the checks will be run before every commit.
In case anyone forgets to enable pre-commit locally, it should also be run by GitHub Actions in each PR.
At the same time, I think it would also be a good idea to switch to black's default line length of 88 characters.
I grew up using vi at 80 chars in a terminal. 88 characters would require me to have a lobotomy. :wink:
(But yeah, this seems to be the way to go...)
Explanation from the black developers here.