Skip to content

chore: use ruff for linting and formatting #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# .git-blame-ignore-revs
# Use this file to ignore commits in git blame that are just formatting changes
# Configure with: git config blame.ignoreRevsFile .git-blame-ignore-revs

# Switch to ruff formatting
fba8bda
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ python3.11 -m pytest --cov=src --cov-report term --cov-report html --cov-report
### Formatting code

```bash
yapf -i -r -p .
python3.11 -m ruff format .
```

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

### Generating Docs
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
source venv/bin/activate
pip3 install --upgrade pip
python3.10 -m pip install -e ".[dev]"
- name: Lint with pylint
- name: Lint with ruff
run: |
source venv/bin/activate
python3.10 -m pylint $(git ls-files '*.py')
python3.10 -m ruff check .
- name: Lint with mypy
run: |
source venv/bin/activate
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
source venv/bin/activate
pip3 install --upgrade pip
python3.10 -m pip install -e ".[dev]"
- name: Check Formatting
- name: Check Formatting with ruff
run: |
source venv/bin/activate
yapf -d -r -p .
python3.10 -m ruff format --check .
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,8 @@ doc/dist
.idea
.vscode/*
!.vscode/settings.json

# Local development files
async.md
modernization.md
uv.lock
Loading