diff --git a/Makefile b/Makefile index 85829f5..c580632 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # This file has been auto-generated. # All changes will be lost, see Projectfile. # -# Updated at 2016-12-28 11:17:56.199090 +# Updated at 2016-12-28 15:50:31.026587 PYTHON ?= $(shell which python) PYTHON_BASENAME ?= $(shell basename $(PYTHON)) @@ -16,8 +16,10 @@ SPHINX_OPTS ?= SPHINX_BUILD ?= $(VIRTUAL_ENV)/bin/sphinx-build SPHINX_SOURCEDIR ?= docs SPHINX_BUILDDIR ?= $(SPHINX_SOURCEDIR)/_build +YAPF ?= $(VIRTUAL_ENV)/bin/yapf +YAPF_OPTIONS ?= -rip -.PHONY: $(SPHINX_SOURCEDIR) clean install install-dev lint test +.PHONY: $(SPHINX_SOURCEDIR) clean format install install-dev lint test # Installs the local project dependencies. install: $(VIRTUAL_ENV) @@ -50,3 +52,6 @@ test: install-dev $(SPHINX_SOURCEDIR): install-dev $(SPHINX_BUILD) -b html -D latex_paper_size=a4 $(SPHINX_OPTS) $(SPHINX_SOURCEDIR) $(SPHINX_BUILDDIR)/html + +format: install-dev + $(YAPF) $(YAPF_OPTIONS) . diff --git a/Projectfile b/Projectfile index 7136ebf..b4ea177 100644 --- a/Projectfile +++ b/Projectfile @@ -17,6 +17,7 @@ enable_features = { 'git', 'pylint', 'python', + 'yapf', } install_requires = [ diff --git a/bonobo/core/contexts.py b/bonobo/core/contexts.py index aa66a98..6a4d7f0 100644 --- a/bonobo/core/contexts.py +++ b/bonobo/core/contexts.py @@ -10,6 +10,7 @@ from bonobo.core.stats import WithStatistics from bonobo.util.lifecycle import get_initializer, get_finalizer from bonobo.util.tokens import BEGIN, END, NEW, RUNNING, TERMINATED, NOT_MODIFIED + class ExecutionContext: def __init__(self, graph, plugins=None): self.graph = graph