Open arporter opened 2 years ago
This workflow will automatically apply black
to the whole project and autocommits:
name: black
on:
push:
paths:
- '**.py'
jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install black
run: pip install black
- name: Run black
run: black src
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Apply black changes"
Thanks @ZedThree. I think I'll hold off doing that for now as it introduces a lot of changes - I'll open a discussion ticket for it.
I do think it is very much worth doing, but you almost certainly want to do it in its own PR. Conflicts with other branches can simply be fixed by applying black
.
We have a lot of lines that are too long. I'll fix those in this issue.