Remove unnecessary intermediate variable syn_lines.

This commit is contained in:
voussoir 2020-09-12 17:33:45 -07:00
parent c11fb12069
commit 188095c30b

View file

@ -21,8 +21,7 @@ def easybake(tags, include_synonyms=True, with_objects=False):
lines.append(my_line) lines.append(my_line)
if include_synonyms: if include_synonyms:
syn_lines = tag.get_synonyms() syn_lines = [f'{tag.name}+{syn}' for syn in tag.get_synonyms()]
syn_lines = [f'{tag.name}+{syn}' for syn in syn_lines]
if with_objects: if with_objects:
syn_lines = [(line, tag) for line in syn_lines] syn_lines = [(line, tag) for line in syn_lines]
lines.extend(syn_lines) lines.extend(syn_lines)