Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto formatting with Black #25

Open
matejc opened this issue Aug 17, 2021 · 0 comments
Open

Auto formatting with Black #25

matejc opened this issue Aug 17, 2021 · 0 comments

Comments

@matejc
Copy link
Contributor

matejc commented Aug 17, 2021

When we have Github Actions PR merged, we might look into Black for automatic code formatting.

We might use something of a sort (not tested):

jobs:
  format:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
            # hack, so that git-auto-commit-action@v4 works with checkout@v2
            ref: ${{ github.head_ref }}
      - uses: psf/black@stable
        with:
          # overwrite options so that it does not do check-only
          options: "--verbose"
      - name: Commit black formatting results
        uses: stefanzweifel/git-auto-commit-action@v4
        with:
            commit_message: "Format Python code with psf/black push"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant