From 735698054f90985d82d40d26232d6d3b42b7659a Mon Sep 17 00:00:00 2001 From: Steffen Baarsgaard Date: Fri, 4 Oct 2024 07:49:26 +0200 Subject: [PATCH] Infrastructure: make docker-fmt for invoking black (#1462) --- Makefile | 3 +++ tox.ini | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/Makefile b/Makefile index f95e5acfc..28650320e 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,9 @@ docker-qa-build: Dockerfile.qa requirements.txt requirements-dev.txt --build-arg PYTHON_VERSION=$(PYTHON_VERSION) \ --file $< . +docker-fmt: docker-qa-build + docker run --rm -v `pwd`:/atlassian-python-api $(QA_CONTAINER) tox -e black_fmt + docker-atlassian-standalone: Dockerfile.standalone docker build \ --tag $(ATLASSIAN_SDK) \ diff --git a/tox.ini b/tox.ini index b8c071931..e5f097c1d 100644 --- a/tox.ini +++ b/tox.ini @@ -40,6 +40,13 @@ skip_install = true deps = black commands = black --check --diff {[base]linting_targets} --exclude __pycache__ +[testenv:black_fmt] +basepython = python3 +target-version = ["py37"] +skip_install = true +deps = black +commands = black {[base]linting_targets} --exclude __pycache__ + [testenv:mypy] basepython = python3 skip_install = true