Automate the autoformatters
We currently have autoformatters for several things (black
for code formatting, isort
and seed-isort-config
for import ordering), and it'd be nice to automate them further. There are two components to this:
- Run via
pre-commit
. Where possible, developers should installpre-commit
and use a configuration provided by the yak-bak project. - These should also run in CI and have a bot commit any changes if they exist. Any code that's already formatted correctly will not be subject to this. Per @dirn, this step should fail (to prevent a build from continuing) and let the build for the amended commit take over.
Edited by Jon Banafato