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):
|
||||
|
||||
# attempt workaround of https://github.com/newsapps/beeswithmachineguns/issues/17
|
||||
|
|
|
@ -259,11 +259,13 @@ class _jinja2_vars(object):
|
|||
here.
|
||||
extras is a list of locals to also search for variables.
|
||||
'''
|
||||
|
||||
def __init__(self, basedir, vars, globals, *extras):
|
||||
self.basedir = basedir
|
||||
self.vars = vars
|
||||
self.globals = globals
|
||||
self.extras = extras
|
||||
|
||||
def __contains__(self, k):
|
||||
if k in self.vars:
|
||||
return True
|
||||
|
@ -273,6 +275,7 @@ class _jinja2_vars(object):
|
|||
if k in self.globals:
|
||||
return True
|
||||
return False
|
||||
|
||||
def __getitem__(self, varname):
|
||||
if varname not in self.vars:
|
||||
for i in self.extras:
|
||||
|
@ -288,6 +291,7 @@ class _jinja2_vars(object):
|
|||
return var
|
||||
else:
|
||||
return template(self.basedir, var, self.vars)
|
||||
|
||||
def add_locals(self, locals):
|
||||
'''
|
||||
If locals are provided, create a copy of self containing those
|
||||
|
|
Loading…
Reference in New Issue