Skip to content

Commit 4e674e7

Browse files
authored
chore: use ruff for linting and formatting (#246)
1 parent 3e53ed2 commit 4e674e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1368
-1907
lines changed

.git-blame-ignore-revs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# .git-blame-ignore-revs
2+
# Use this file to ignore commits in git blame that are just formatting changes
3+
# Configure with: git config blame.ignoreRevsFile .git-blame-ignore-revs
4+
5+
# Switch to ruff formatting
6+
fba8bda

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ python3.11 -m pytest --cov=src --cov-report term --cov-report html --cov-report
4949
### Formatting code
5050

5151
```bash
52-
yapf -i -r -p .
52+
python3.11 -m ruff format .
5353
```
5454

5555
### Running lints & type checking
@@ -58,7 +58,7 @@ yapf -i -r -p .
5858
# Type checking
5959
python3.11 -m mypy .
6060
# Linting
61-
python3.11 -m pylint $(git ls-files '*.py')
61+
python3.11 -m ruff check .
6262
```
6363

6464
### Generating Docs

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ jobs:
4848
source venv/bin/activate
4949
pip3 install --upgrade pip
5050
python3.10 -m pip install -e ".[dev]"
51-
- name: Lint with pylint
51+
- name: Lint with ruff
5252
run: |
5353
source venv/bin/activate
54-
python3.10 -m pylint $(git ls-files '*.py')
54+
python3.10 -m ruff check .
5555
- name: Lint with mypy
5656
run: |
5757
source venv/bin/activate
@@ -96,7 +96,7 @@ jobs:
9696
source venv/bin/activate
9797
pip3 install --upgrade pip
9898
python3.10 -m pip install -e ".[dev]"
99-
- name: Check Formatting
99+
- name: Check Formatting with ruff
100100
run: |
101101
source venv/bin/activate
102-
yapf -d -r -p .
102+
python3.10 -m ruff format --check .

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,8 @@ doc/dist
139139
.idea
140140
.vscode/*
141141
!.vscode/settings.json
142+
143+
# Local development files
144+
async.md
145+
modernization.md
146+
uv.lock

0 commit comments

Comments
 (0)