Skip to content

Auto formatting with Black #25

@matejc

Description

@matejc

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions