From 453d0cfa39e3b02ab6be6131b37050b3e6eca539 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 30 Jun 2017 09:48:34 +1000 Subject: [PATCH] export: Simplify expressions. --- pywal/export_colors.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pywal/export_colors.py b/pywal/export_colors.py index 64dc2a7..29e0067 100755 --- a/pywal/export_colors.py +++ b/pywal/export_colors.py @@ -36,14 +36,12 @@ def export_all_templates(colors, template_dir=None, output_dir=CACHE_DIR): # Merge all colors (specials and normals) into one dict so we can access # their values simpler. - all_colors = {} - # pylint: disable=W0106 - [all_colors.update(value) for value in colors.values()] + all_colors = {**colors["special"], **colors["colors"]} # Turn all those colors into util.Color instances for accessing the # .hex and .rgb formats all_colors = {k: util.Color(v) for k, v in all_colors.items()} # pylint: disable=W0106 - for file in os.scandir(template_dir): - template(all_colors, file.path, output_dir) + [template(all_colors, file.path, output_dir) + for file in os.scandir(template_dir)]