Skip to content

Commit

Permalink
Autoformatting (#115)
Browse files Browse the repository at this point in the history
* apply autoformatting to main

* minor
  • Loading branch information
louisblankemeier authored Sep 25, 2023
1 parent edbb33a commit 95b1125
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: Format code
name: Autoformat code

on:
push:
branches: [ 'master' ]
branches: [ 'main' ]
pull_request:
branches: [ 'master' ]
branches: [ 'main' ]

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Format code with black
- name: Format code
run: |
pip install black
black .
- name: Sort imports with isort
- name: Sort imports
run: |
pip install isort
isort .
- name: Remove unused imports with autoflake
- name: Remove unused imports
run: |
pip install autoflake
autoflake --in-place --remove-all-unused-imports --remove-unused-variables --recursive .
Expand All @@ -28,6 +28,6 @@ jobs:
with:
author_name: ${{ github.actor }}
author_email: ${{ github.actor }}@users.noreply.github.com
message: "Format code with black"
message: "Autoformat code"
add: "."
branch: ${{ github.ref }}

0 comments on commit 95b1125

Please sign in to comment.