From 0e27423cffb3b6047028c61890bec43bf626adc7 Mon Sep 17 00:00:00 2001 From: grdddj Date: Mon, 14 Feb 2022 18:15:11 +0100 Subject: [PATCH] feat(ci): add quick style checks suitable for git hooks [no changelog] --- Makefile | 5 +++++ python/Makefile | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 58c31217a..1026b45b0 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,11 @@ pystyle_check: ## run code style check on application sources and tests @echo [PYTHON] make -C python style_check +pystyle_quick_check: ## run the basic style checks, suitable for a quick git hook + @isort --check-only $(PY_FILES) + @black --check $(PY_FILES) + make -C python style_quick_check + pystyle: ## apply code style on application sources and tests @echo [ISORT] @isort $(PY_FILES) diff --git a/python/Makefile b/python/Makefile index 6988aad2a..62e1585cd 100644 --- a/python/Makefile +++ b/python/Makefile @@ -57,6 +57,10 @@ style_check: flake8 pyright +style_quick_check: + black --check $(STYLE_TARGETS) + isort --check-only --recursive $(STYLE_TARGETS) --skip-glob "$(EXCLUDE_TARGETS)/*" + .PHONY: all build install clean style style_check git-clean clean-build clean-pyc clean-test test: