-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 Implement Ruff as check instead of Black creating a commit
- Loading branch information
1 parent
9e954c8
commit 38c23c7
Showing
1 changed file
with
4 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,13 @@ | ||
name: Format Python | ||
name: Ensure formatted code | ||
on: | ||
pull_request: | ||
types: [ opened, edited, reopened, synchronize, ready_for_review ] | ||
workflow_dispatch: | ||
jobs: | ||
format: | ||
format_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: chartboost/ruff-action@491342200cdd1cf4d5132a30ddc546b3b5bc531b | ||
with: | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
- name: Format code with black | ||
run: | | ||
pip install black | ||
black --line-length 120 . | ||
- name: Commit changes | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
default_author: github_actions | ||
message: "Formatted code with black --line-length 120" | ||
add: "." | ||
changed-files: 'true' |