icecube / skyllh

https://icecube.github.io/skyllh/
GNU General Public License v3.0
11 stars 5 forks source link

Introduce black formatter #135

Open tomaskontrimas opened 1 year ago

tomaskontrimas commented 1 year ago

It will configure github action and pre-commit hook to run black. Hooks also contain isort and flake8. Flake8 is configured to always pass, but show existing errors.

I suggest to merge this branch after the parameter_handling branch is merged to master. Then run:

pre-commit run --all-files

and commit all formatting changes. This allows us to add the commit sha to .git-blame-ignore-revs file, which is used by git blame to ignore specified commits.

martwo commented 1 year ago

I hope that when merging the parameter_handling branch there won't be any changes necessary by black ;)

tomaskontrimas commented 1 year ago

Right, I should have written it out better.

I think we have two options here:

  1. merge this PR now and run black on master branch, but it means that Chiara and Martin will have to deal with possible merge conflicts in publicdata and parameter_handling branches
  2. merge publicdata and parameter_handling branches first, then merge this PR and deal with formatting change only at one place

I suggest we follow point 2., therefore this is a draft PR