inline write_pair() into write_list_vars()

write_pair() is only used by write_list_vars(), so there's no need to
keep it as a separate function
This commit is contained in:
Christian Boltz 2018-05-31 21:37:50 +02:00
parent c2a420d32b
commit 06eb65eb50
Failed to generate hash of commit

View file

@ -175,7 +175,14 @@ def set_ref_allow(prof_data, allow):
else:
return prof_data, ''
def write_pair(prof_data, depth, allow, name, prefix, sep, tail, fn):
def write_list_vars(prof_data, depth):
allow = ''
name = 'lvar'
prefix = ''
sep = ' = '
tail = ''
fn = var_transform
pre = ' ' * depth
data = []
ref, allow = set_ref_allow(prof_data, allow)
@ -226,9 +233,6 @@ def var_transform(ref):
data.append(quote_if_needed(value))
return ' '.join(data)
def write_list_vars(prof_data, depth):
return write_pair(prof_data, depth, '', 'lvar', '', ' = ', '', var_transform)
def write_link_rules(prof_data, depth, allow):
pre = ' ' * depth
data = []