diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1d83981..13dfe35 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,18 +12,17 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v3 - - name: Install Rye - uses: sbarrios93/rye-rust-action@v0.1.0 - id: rye-installer + - name: Install Rye + run: | + curl -sSf https://rye-up.com/get | bash - - name: Show Rye version - run: | - echo "Installed Rye commit hash: ${{ steps.rye-installer.outputs.rye_commit_hash }}" - rye --version + - name: Sync dependencies + run: | + rye sync - - name: Sync dependencies - run: | - rye sync + - name: Linting + run: | + rye run lint diff --git a/pyproject.toml b/pyproject.toml index 9484dce..df03314 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,9 @@ requires = ["hatchling"] build-backend = "hatchling.build" [tool.rye.scripts] +lint = { chain = ["lint:black", "lint:isort" ] } +"lint:black" = "black --check src" +"lint:isort" = "isort src" [tool.rye] managed = true diff --git a/src/execy/exec.py b/src/execy/exec.py index 485e638..f7cc250 100644 --- a/src/execy/exec.py +++ b/src/execy/exec.py @@ -1,5 +1,5 @@ -import time import asyncio +import time from functools import wraps