Commit 01994460 authored by Denis Laxalde's avatar Denis Laxalde
Browse files

Drop useless lists in .join() calls in serialize_links()

parent d1ab61e767d8
......@@ -30,11 +30,11 @@ def serialize_links(link_dict):
for link in links:
link['rel'] = rel
href = link.pop('href')
params = '; '.join(['{}="{}"'.format(k, v)
for k, v in sorted(link.items())])
params = '; '.join('{}="{}"'.format(k, v)
for k, v in sorted(link.items()))
ldos.append({"href": href, "params": params})
ldos.sort(key=lambda ldo: (ldo["href"], ldo["params"]))
return ', '.join(['<{href}>; {params}'.format(**ldo) for ldo in ldos])
return ', '.join('<{href}>; {params}'.format(**ldo) for ldo in ldos)
def _split_unquotted(delimiter, string):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment