Skip to content

Commit

Permalink
Merge pull request #16 from funkelab/update_workflows
Browse files Browse the repository at this point in the history
Use ruff instead of black for formatting
  • Loading branch information
cmalinmayor authored Jul 25, 2024
2 parents 5a8face + aca55c1 commit 4a28a20
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 27 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/black.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,22 @@ name: Test

on:
push:
branches:
- main
pull_request:

jobs:
ruff:
name: Ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
with:
args: 'format --check'

test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
12 changes: 4 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ci:
autofix_commit_msg: "style(pre-commit.ci): auto fixes [...]"
autoupdate_commit_msg: "ci(pre-commit.ci): autoupdate"

default_install_hook_types: [pre-commit, commit-msg]
default_install_hook_types: [pre-commit]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -14,16 +14,12 @@ repos:
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.2.2
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.1
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ dependencies = [
dev = [
'pytest',
'pytest-cov',
'black',
'mypy',
'pdoc',
'pre-commit',
'types-tqdm',
'pytest-unordered'
'pytest-unordered',
'ruff',
]

[project.urls]
Expand Down

0 comments on commit 4a28a20

Please sign in to comment.