diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 000000000..13ea29be1 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,19 @@ +on: + pull_request: + push: + branches: + - master +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: chartboost/ruff-action@v1 + - run: | + ruff check . + ruff fix . + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: 'style fixes by ruff' + + \ No newline at end of file diff --git a/.ruff.toml b/.ruff.toml new file mode 100644 index 000000000..f1d75fbe0 --- /dev/null +++ b/.ruff.toml @@ -0,0 +1,8 @@ +line-length = 120 +indent-width = 4 + +fixable = ["ALL"] +unfixable = [] + +[format] +line-ending = "lf" \ No newline at end of file