Skip to content

Commit

Permalink
Add pre-commit workflow with ruff format (#2327)
Browse files Browse the repository at this point in the history
  • Loading branch information
lalten authored Jun 29, 2024
1 parent 7fa8404 commit ab4fd94
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
hooks:
- id: ruff-format
1 change: 1 addition & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line-length = 120

0 comments on commit ab4fd94

Please sign in to comment.