Skip to content

Add Black and flake8 CI

sroet requested to merge sroet/eT:black_ci into blacktest

This adds an CI step to automatically apply black whenever a python file changes on protected branches. It also runs a flake8 test after that (or just flake8 for unprotected branches), to see if the rest of the changes are pep8 compliant In order for M.I.B. to be able to push to the parent repo:

  1. generate a new keygen pair
  2. add the public key to Settings>Repository>DeployKeys and tick the write access box
  3. add the private key to Settings>CI/CD>Variables, make it PROTECTED
  4. ??
  5. profit!

I also cleaned up some pep8 issues with the rest of the code (mainly black not being able to reformat comments)

Feel free to either merge this in, or take what you want to use from it ;)

Merge request reports