From c96c151b71ee447caa582e09a891309f8cfdbad1 Mon Sep 17 00:00:00 2001 From: Ivan Schaller Date: Mon, 16 Jun 2025 18:17:19 +0200 Subject: [PATCH] fix format script for --check option and update ci files for docs build Signed-off-by: Ivan Schaller --- .github/workflows/docs.yml | 4 ++-- script/format | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f323285..07fdc9d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,8 +22,8 @@ jobs: with: python-version: "3.12" - - name: Install requirements - run: pip install -r requirements.txt + - name: Install requirements-dev + run: pip install -r requirements-dev.txt - name: Run scripts/get-docs run: ./script/get-docs diff --git a/script/format b/script/format index d83d0cd..7b538b2 100755 --- a/script/format +++ b/script/format @@ -10,4 +10,8 @@ SOURCE_MARKDOWN="$(find *.md docs examples -name '*.md')" isort "$@" $SOURCES_PYTHON black "$@" $SOURCES_PYTHON -mdformat --compact-tables --number $SOURCE_MARKDOWN +if [[ "$*" =~ check ]]; then + mdformat --check --compact-tables --number $SOURCE_MARKDOWN +else + mdformat --compact-tables --number $SOURCE_MARKDOWN +fi