From 1ea49d8722b78d7f5b1aeb47a8d8af05209bfdb1 Mon Sep 17 00:00:00 2001 From: tamara-glazer Date: Fri, 2 Apr 2021 16:46:42 -0400 Subject: [PATCH] make format --- {{ cookiecutter.repo_name }}/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/{{ cookiecutter.repo_name }}/Makefile b/{{ cookiecutter.repo_name }}/Makefile index 2a9d7b3..9ef07d4 100644 --- a/{{ cookiecutter.repo_name }}/Makefile +++ b/{{ cookiecutter.repo_name }}/Makefile @@ -1,4 +1,4 @@ -.PHONY: clean data lint requirements sync_data_down sync_data_up +.PHONY: clean data lint format requirements sync_data_down sync_data_up ################################################################################# # GLOBALS # @@ -37,6 +37,10 @@ clean: lint: flake8 {{ cookiecutter.module_name }} +## Format with black +format: + black --config pyproject.toml {{ cookiecutter.module_name }} + {% if not cookiecutter.dataset_storage.none %} ## Download Data from storage system sync_data_down: @@ -82,6 +86,10 @@ create_environment: {% endif %} {% endif %} +## Wrapper for format and lint +pre-commit: + make format + make lint ################################################################################# # PROJECT RULES #