Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion {{cookiecutter.project_slug}}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand All @@ -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

Expand Down