Upgrade CI + lint tools (#745)

* Upgrade Ruff, use it for formatting too

* Upgrade GitHub Actions
pull/746/head
Aarni Koskela 2024-03-21 10:10:23 +02:00 committed by GitHub
parent 34f652322f
commit bdf92f6c33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 13 deletions

View File

@ -12,14 +12,14 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pre-commit/action@v3.0.0
- uses: actions/checkout@v4
- uses: pre-commit/action@v3.0.1
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"

View File

@ -1,20 +1,15 @@
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.259
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.3
hooks:
- id: ruff
args:
- --fix
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: end-of-file-fixer
exclude: ^collections/.*
- id: trailing-whitespace
exclude: ^collections/.*
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
args:
- --quiet

View File

@ -16,6 +16,8 @@ markers = [
[tool.ruff]
target-version = "py310"
[tool.ruff.lint]
select = [
"B",
"C",