Skip to content

Commit

Permalink
update ruff (#437)
Browse files Browse the repository at this point in the history
* update ruff

* test

* update ruff

* update pyproject
  • Loading branch information
callebtc authored Feb 17, 2024
1 parent c4f4f3c commit 48158cd
Show file tree
Hide file tree
Showing 6 changed files with 332 additions and 400 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
type: string

jobs:
formatting:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -26,8 +26,8 @@ jobs:
cache: "poetry"
- name: Install packages
run: poetry install
- name: Check black
run: make black-check
- name: Ruff check
run: make ruff-check
mypy:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Nutshell CI
name: CI
on:
push:
branches:
Expand Down
12 changes: 4 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exclude: "^cashu/nostr/.*"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -12,16 +12,12 @@ repos:
- id: debug-statements
- id: mixed-line-ending
- id: check-case-conflict
# - repo: https://github.com/psf/black
# rev: 23.11.0
# hooks:
# - id: black
# args: [--line-length=150]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.283
rev: v0.2.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.0
hooks:
Expand Down
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@ ruff:
ruff-check:
poetry run ruff check .

black:
poetry run black .

black-check:
poetry run black . --check

mypy:
poetry run mypy cashu --check-untyped-defs

format: black ruff
format: ruff

check: black-check ruff-check mypy
check: ruff-check mypy

clean:
rm -r cashu.egg-info/ || true
Expand Down
Loading

0 comments on commit 48158cd

Please sign in to comment.