Skip to content

Commit 6b035c6

Browse files
committed
Add ruff
1 parent 6cda453 commit 6b035c6

File tree

4 files changed

+94
-189
lines changed

4 files changed

+94
-189
lines changed

.github/workflows/ci.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Lint and Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- run: pipx install poetry
11+
- name: Install Python
12+
uses: actions/setup-python@v5
13+
with:
14+
python-version: "3.11"
15+
- name: Install dependencies
16+
run: |
17+
poetry env use "3.11"
18+
poetry export --only lint --output lint-requirements.txt
19+
pip install -r lint-requirements.txt
20+
- name: Run Ruff
21+
run: ruff check --output-format=github .

.pre-commit-config.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,13 @@ repos:
1212
hooks:
1313
- id: flake8
1414
exclude: "src/tests/"
15-
additional_dependencies: [Flake8-pyproject]
15+
additional_dependencies: [Flake8-pyproject]
16+
- repo: https://github.com/astral-sh/ruff-pre-commit
17+
# Ruff version.
18+
rev: v0.3.0
19+
hooks:
20+
# Run the linter.
21+
- id: ruff
22+
args: [ --fix ]
23+
# Run the formatter.
24+
- id: ruff-format

poetry.lock

+51-170
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)