diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a6f5d32afe..2aa5ddbcff 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/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}' diff --git a/python/pyproject.toml b/python/pyproject.toml index 9d2618ef54..013ec09aca 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -73,10 +73,6 @@ warn_return_any = false implicit_reexport = true strict_equality = true -[tool.black] -include = '\.pyi?$' -exclude = "venv" - [tool.ruff.lint] select = [ # pycodestyle error