Skip to content

Commit

Permalink
Use Ruff for auto formatting (#42)
Browse files Browse the repository at this point in the history
* init Ruff github action

* fix indentation

* config git auto commit
  • Loading branch information
Adamtaranto authored Sep 20, 2024
1 parent 373bef3 commit 52a4ec9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Ruff Formatting
on: [push, pull_request]
jobs:
ruff:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the changed files.
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: chartboost/ruff-action@v1
with:
src: './src/python'
args: 'format --target-version py310'
- uses: stefanzweifel/git-auto-commit-action@v5
id: auto-commit-action
with:
commit_message: 'Style fixes by Ruff'

0 comments on commit 52a4ec9

Please sign in to comment.