From 33ea79ef9f8b59955f596a7840ba1e0521471a1a Mon Sep 17 00:00:00 2001 From: Craig Jones Date: Mon, 21 Mar 2022 02:38:01 -0700 Subject: [PATCH 1/2] Added an explainer for how the help is generated. --- {{cookiecutter.project_slug}}/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/Makefile b/{{cookiecutter.project_slug}}/Makefile index b2cf6cda7..50571780e 100644 --- a/{{cookiecutter.project_slug}}/Makefile +++ b/{{cookiecutter.project_slug}}/Makefile @@ -12,6 +12,8 @@ endef export BROWSER_PYSCRIPT define PRINT_HELP_PYSCRIPT +# Scan thru a Makefile (e.g. this file), looking for target definitions that have a special trailing comment +# (one that starts with two #'s), and consider that comment to be the help text. import re, sys for line in sys.stdin: @@ -25,7 +27,7 @@ export PRINT_HELP_PYSCRIPT BROWSER := python -c "$$BROWSER_PYSCRIPT" help: - @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) + @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) # MAKEFILE_LIST names this file itself, plus any include files clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts From 098294c97f5ddeaab77a4f7024516dfc721552c1 Mon Sep 17 00:00:00 2001 From: Craig Jones Date: Mon, 21 Mar 2022 03:01:11 -0700 Subject: [PATCH 2/2] Added a note to Makefile regarding how the user might want to make flake8 less strict. --- {{cookiecutter.project_slug}}/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/{{cookiecutter.project_slug}}/Makefile b/{{cookiecutter.project_slug}}/Makefile index 50571780e..f5b14bd9b 100644 --- a/{{cookiecutter.project_slug}}/Makefile +++ b/{{cookiecutter.project_slug}}/Makefile @@ -50,6 +50,22 @@ clean-test: ## remove test and coverage artifacts rm -fr htmlcov/ rm -fr .pytest_cache +# NOTE: You might want to make the following invocation of flake8 less strict +# than what .flake8 specifies (especially if you'll be running this frequently +# against a work in progress) +# +# To do this, add the following option to the command line: +# +# --extend-ignore=W191,W391,E203,E265,F841,E722,E301 +# +# E301 = expected 1 blank line, found 0 +# F841 = variable defined but never used +# E722 = do not use bare 'except' +# +# You might also want to add: +# +# --max-line-length=256 + lint/flake8: ## check style with flake8 flake8 {{ cookiecutter.project_slug }} tests