From 6e4876839b19ee54d5802805a455117bbcbdb52c Mon Sep 17 00:00:00 2001 From: jo Date: Mon, 13 Sep 2021 14:21:19 +0200 Subject: [PATCH] Add format in shared makefile --- tools/Makefile | 1 + tools/python.mk | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/tools/Makefile b/tools/Makefile index ad8adad3f..37a6d93e7 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -7,6 +7,7 @@ PYLINT_ARG := tools MYPY_ARG := . PYTEST_ARG := . +format: .format lint: .pylint .mypy test: .pytest clean: .clean diff --git a/tools/python.mk b/tools/python.mk index 814cbcf92..b80f0d61f 100644 --- a/tools/python.mk +++ b/tools/python.mk @@ -15,6 +15,12 @@ $(VENV): pip install --upgrade pip setuptools wheel pip install $(PIP_INSTALL) +.PHONY: .format +.format: $(VENV) + source $(VENV)/bin/activate + black . + isort --profile black . + .PHONY: .pylint .pylint: $(VENV) source $(VENV)/bin/activate