Skip to content

Commit f9613b3

Browse files
committed
ci: use Ruff for linting and formatting
1 parent b605a9a commit f9613b3

3 files changed

Lines changed: 24 additions & 7 deletions

File tree

.github/workflows/linters.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Linters
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
jobs:
7+
ruff-check:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Install Python
12+
uses: actions/setup-python@v5
13+
with:
14+
python-version: "3.13"
15+
- name: Install dependencies
16+
run: |
17+
python -m pip install --upgrade pip
18+
pip install ruff
19+
# Update output format to enable automatic inline annotations.
20+
- name: Run Ruff
21+
run: ruff check --output-format=github .
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
name: CI
2-
1+
name: Tests
32
on:
43
pull_request:
54
branches:
65
- main
7-
86
jobs:
97
unit-tests:
108

@@ -27,7 +25,3 @@ jobs:
2725
- name: Unit tests
2826
run: |
2927
python3 -m unittest -v
30-
- name: PEP8
31-
run: |
32-
python3 -m pip install flake8
33-
flake8 --max-line-length 120

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Requirements
1313
- Python >= 3.8
1414
- requests
1515

16+
This project uses `Ruff <https://docs.astral.sh/ruff/>`_ for linting and formatting.
17+
1618
Installation
1719
------------
1820

0 commit comments

Comments
 (0)