def resolve_environment(service_dict, environment=None):
 env = {}
 for env_file in service_dict.get(u'env_file', []):
  env.update(env_vars_from_file(env_file))
 env.update(parse_environment(service_dict.get(u'environment')))
 return dict((resolve_env_var(k, v, environment) for (k, v) in six.iteritems(env)))

def resolve_environment ( service_dict , environment = None ) : env = { } for env_file in service_dict . get ( u'env_file' , [ ] ) : env . update ( env_vars_from_file ( env_file ) ) env . update ( parse_environment ( service_dict . get ( u'environment' ) ) ) return dict ( ( resolve_env_var ( k , v , environment ) for ( k , v ) in six . iteritems ( env ) ) )
unpack any environment variables from an env_file .