/python-format-action

A github action to use the Black python code formatter (https://github.com/psf/black)

Primary LanguageShellMIT LicenseMIT

Black format Github action

This project can be used to run Black on every push using Github actions.

Usage

For a more detailed installation guide look there

Create a formatter.yml file in .github/workflows/. Paste this code into the file:

on: push
name: Black Python Formatter
jobs:
  lint:
    name: Black Python Formatter
    runs-on: ubuntu-latest
    steps:
    - name: Black Python Formatter
      uses: antoinealb/black-formatter-action@clang9
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}