Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

Latest commit

 

History

History
34 lines (24 loc) · 797 Bytes

README.md

File metadata and controls

34 lines (24 loc) · 797 Bytes

black-suggest

GitHub action that suggests edits from the black autoformatter for Python

Installing

Create and commit .github/workflows/black-suggest.yml in your repo.

name: Run Black on Pull Request

on:
  pull_request:

jobs:
  black-suggest:
    runs-on: ubuntu-latest
    steps:
      # Check out the repository
      - uses: actions/checkout@v2

      # Run the action that comments with suggestions
      - uses: cloudtostreet/black-suggest@v1
        with:
          # The access token is needed to be able to make comments
          access-token: ${{ secrets.GITHUB_TOKEN }}

          # The directory to run the formatter on. "." for everything.
          path: "."

          # (optional) line length. this is optional, and defaults to 88
          line-length: 120