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: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: pre-commit/action@v3.0.0 - uses: pre-commit/action@v3.0.1
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: "3.10" python-version: "3.10"
cache: "pip" cache: "pip"

View File

@ -1,20 +1,15 @@
repos: repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.259 rev: v0.3.3
hooks: hooks:
- id: ruff - id: ruff
args: args:
- --fix - --fix
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0 rev: v4.5.0
hooks: hooks:
- id: end-of-file-fixer - id: end-of-file-fixer
exclude: ^collections/.* exclude: ^collections/.*
- id: trailing-whitespace - id: trailing-whitespace
exclude: ^collections/.* 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] [tool.ruff]
target-version = "py310" target-version = "py310"
[tool.ruff.lint]
select = [ select = [
"B", "B",
"C", "C",