From e42fdc7d0135f9aa98b201e2fee550b00ca29718 Mon Sep 17 00:00:00 2001 From: Florian Maas Date: Tue, 16 Jul 2024 17:09:54 +0200 Subject: [PATCH 1/2] Remove references to black from the project --- docs/Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docs/Makefile diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000000..9a1bfea066 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +.DEFAULT_GOAL := help + +.PHONY: install-ruff +install-ruff: ## install ruff + $(info --- Installing ruff ---) + pip install ruff==0.5.2 + +.PHONY: format +format: install-ruff ## format code with ruff + $(info --- format Python code in docs ---) + ruff format . + +.PHONY: check +check: install-ruff ## check if code is formatted with ruff + $(info --- format Python code in docs ---) + ruff format --check . + +.PHONY: help +help: + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' From 9c55e7ceb7e517048de38e90ba77834a43cf26ce Mon Sep 17 00:00:00 2001 From: Florian Maas Date: Tue, 16 Jul 2024 17:11:07 +0200 Subject: [PATCH 2/2] Remove references to black from the project --- .github/workflows/docs.yml | 6 +++--- .github/workflows/python_build.yml | 2 +- python/pyproject.toml | 4 ---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 079cd66fcc..a715d1fb50 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -31,9 +31,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: psf/black@stable - with: - src: docs/src/python + - run: | + cd docs + make check build-deploy: needs: diff --git a/.github/workflows/python_build.yml b/.github/workflows/python_build.yml index bc2f20cc9a..63d3218805 100644 --- a/.github/workflows/python_build.yml +++ b/.github/workflows/python_build.yml @@ -22,7 +22,7 @@ jobs: - name: Check Python run: | - pip install ruff black mypy types-dataclasses typing-extensions + pip install ruff mypy types-dataclasses typing-extensions make check-python - name: Install minimal stable with clippy and rustfmt diff --git a/python/pyproject.toml b/python/pyproject.toml index dd69669335..4255529baa 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -72,10 +72,6 @@ warn_return_any = false implicit_reexport = true strict_equality = true -[tool.black] -include = '\.pyi?$' -exclude = "venv" - [tool.ruff.lint] select = [ # pycodestyle error