Skip to content

add black formatter action #8

add black formatter action

add black formatter action #8

Workflow file for this run

name: Black Formatter
on: [push, pull_request]
jobs:
linter_name:
name: runner / black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check files using the black formatter
uses: psf/black@stable
id: action_black
continue-on-error: true
with:
options: "--check --diff"
src: "."
- name: Creating Pull Request to fix formatting errors
if: failure()
uses: peter-evans/create-pull-request@v5
with:
title: "Format Python code with psf/black push"
body: |
There appear to be some python formatting errors in ${{ github.sha }}. This pull request
uses the [psf/black](https://github.com/psf/black) formatter to fix these issues.
base: ${{ github.head_ref }} # Creates pull request onto pull request or commit branch
branch: actions/black