From 318a1d7056cc8a5b9f6b83ef1cd186d6ef8939d4 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Thu, 17 Feb 2022 10:16:15 +0000 Subject: [PATCH] Fix `make diff-format` - The path is required - The target revision may be a release branch, so use the default (i.e. last commit) - Run `isort` in addition to `black`. --- Makefile | 4 ++-- pyproject.toml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5e79240bcc3..d575c9b28c8 100644 --- a/Makefile +++ b/Makefile @@ -38,8 +38,8 @@ docs-develop: ## Fast doc generation and more warnings (for development) setup-venv: if [ ! -f $(VENV)/bin/activate ]; then bash scripts/common_startup.sh --dev-wheels; fi -diff-format: ## Format Python code changes - $(IN_VENV) darker -r $(TARGET_BRANCH) +diff-format: ## Format Python code changes since last commit + $(IN_VENV) darker . format: ## Format Python code base $(IN_VENV) isort . diff --git a/pyproject.toml b/pyproject.toml index 5c897f85dbd..68ee31fbe77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,9 @@ extend-exclude = ''' ''' force-exclude = 'lib/galaxy/util/jstree.py' +[tool.darker] +isort = true + [tool.poetry] name = "galaxy" version = "22.01.dev0"