From 0fc1ae63e9bd2003abb174664b757d2aad05af9e Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 13 Jan 2020 10:26:11 +0000 Subject: [PATCH] Add a command to fix import order We check import order as part of our automated tests. But fixing them means: - manually editing them and rechecking - remembering the parameters to `isort` - looking up the `isort` command from the last time you ran it Putting it in the Makefile should make life a bit easier. --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 0ef85bbdc..17cfe64fa 100644 --- a/Makefile +++ b/Makefile @@ -96,6 +96,10 @@ upload-static: test: ## Run tests ./scripts/run_tests.sh +.PHONY: fix-imports +fix-imports: + isort -rc ./app ./tests + .PHONY: freeze-requirements freeze-requirements: rm -rf venv-freeze