6ea18c84112a — Oben Sonne 8 years ago
tune isort target
1 files changed, 5 insertions(+), 4 deletions(-)

M Makefile
M Makefile +5 -4
@@ 144,11 144,12 @@ build: env/_done_install
 # =============================================================================
 
 .PHONY: isort
+isort: ## sort imports on changed files
 isort:
-	CPF=`hg st -nam | grep '\.py'`; \
-		test -n "$$CPF"\
-			&& env/bin/isort --line-width 80 --order-by-type -m 5 $$CPF \
-			|| echo "nothing to do (no changed python files)"
+	@for file in `hg st -nam | grep '\.py'`; do \
+		echo "isort $$file"; \
+		env/bin/isort --line-width 80 --order-by-type -m 5 $$file; \
+	done
 
 # =============================================================================
 # tests