Fixes from 'make pep8'. Partial, more to come.
parent
23a0a8daf9
commit
9cf66f4376
|
@ -51,7 +51,6 @@ multiprocessing_runner = None
|
||||||
|
|
||||||
################################################
|
################################################
|
||||||
|
|
||||||
|
|
||||||
def _executor_hook(job_queue, result_queue):
|
def _executor_hook(job_queue, result_queue):
|
||||||
|
|
||||||
# attempt workaround of https://github.com/newsapps/beeswithmachineguns/issues/17
|
# attempt workaround of https://github.com/newsapps/beeswithmachineguns/issues/17
|
||||||
|
|
|
@ -259,11 +259,13 @@ class _jinja2_vars(object):
|
||||||
here.
|
here.
|
||||||
extras is a list of locals to also search for variables.
|
extras is a list of locals to also search for variables.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def __init__(self, basedir, vars, globals, *extras):
|
def __init__(self, basedir, vars, globals, *extras):
|
||||||
self.basedir = basedir
|
self.basedir = basedir
|
||||||
self.vars = vars
|
self.vars = vars
|
||||||
self.globals = globals
|
self.globals = globals
|
||||||
self.extras = extras
|
self.extras = extras
|
||||||
|
|
||||||
def __contains__(self, k):
|
def __contains__(self, k):
|
||||||
if k in self.vars:
|
if k in self.vars:
|
||||||
return True
|
return True
|
||||||
|
@ -273,6 +275,7 @@ class _jinja2_vars(object):
|
||||||
if k in self.globals:
|
if k in self.globals:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def __getitem__(self, varname):
|
def __getitem__(self, varname):
|
||||||
if varname not in self.vars:
|
if varname not in self.vars:
|
||||||
for i in self.extras:
|
for i in self.extras:
|
||||||
|
@ -288,6 +291,7 @@ class _jinja2_vars(object):
|
||||||
return var
|
return var
|
||||||
else:
|
else:
|
||||||
return template(self.basedir, var, self.vars)
|
return template(self.basedir, var, self.vars)
|
||||||
|
|
||||||
def add_locals(self, locals):
|
def add_locals(self, locals):
|
||||||
'''
|
'''
|
||||||
If locals are provided, create a copy of self containing those
|
If locals are provided, create a copy of self containing those
|
||||||
|
|
Loading…
Reference in New Issue