diff --git a/{{cookiecutter.project_slug}}/Makefile b/{{cookiecutter.project_slug}}/Makefile index b2cf6cda7..f5b14bd9b 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 @@ -48,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