Skip to content

Commit 01c8d2d

Browse files
committed
Add pre-commit configuration + GitHub Actions lint workflow
1 parent 0e4effd commit 01c8d2d

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.github/workflows/lint.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
Lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.12"
17+
- uses: pre-commit/[email protected]
18+
env:
19+
RUFF_OUTPUT_FORMAT: github

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.1.14
4+
hooks:
5+
- id: ruff
6+
args:
7+
- --fix
8+
# - id: ruff-format # TODO: enable when the time is right

0 commit comments

Comments
 (0)