diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index d044b185..7bb953d4 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -11,7 +11,7 @@ on: type: string jobs: - formatting: + format: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -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: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82296e13..2c50f6b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Nutshell CI +name: CI on: push: branches: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cad022a9..8a7d36b2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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: diff --git a/Makefile b/Makefile index b9e79292..f6cb065b 100644 --- a/Makefile +++ b/Makefile @@ -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