From 200d0f3c038f7e2f4eafccbd0ff87e2f514c9a4b Mon Sep 17 00:00:00 2001 From: Anthony Galassi <28850131+bendhouseart@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:16:59 -0500 Subject: [PATCH] use poetry to run black and install dev dependencies --- .github/workflows/lint-and-spellcheck.yaml | 10 +++++++++- Makefile | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint-and-spellcheck.yaml b/.github/workflows/lint-and-spellcheck.yaml index 4e2cbfc..45c7b4e 100644 --- a/.github/workflows/lint-and-spellcheck.yaml +++ b/.github/workflows/lint-and-spellcheck.yaml @@ -27,6 +27,14 @@ jobs: uses: codespell-project/actions-codespell@v2 with: exclude_file: poetry.lock - + + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + + - name: Install Dependencies + run: | + poetry install --with dev + - name: Lint files with Black run: make check-black diff --git a/Makefile b/Makefile index 730d3cb..c20f63d 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ # Quickly run black on all python files in this repository, local version of the pre-commit hook black: @for file in `find . -name "*.py"`; do \ - black $$file; \ + poetry run black $$file; \ done check-black: - black --check . --exclude="dist/*" --exclude="build/*" --exclude="docs/*"; + poetry run black --check . --exclude="dist/*" --exclude="build/*" --exclude="docs/*"; # install python dependencies pythondeps: