mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-02-15 01:40:28 +01:00
export: Simplify expressions.
This commit is contained in:
parent
6ca3fa2763
commit
453d0cfa39
@ -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
|
# Merge all colors (specials and normals) into one dict so we can access
|
||||||
# their values simpler.
|
# their values simpler.
|
||||||
all_colors = {}
|
all_colors = {**colors["special"], **colors["colors"]}
|
||||||
# pylint: disable=W0106
|
|
||||||
[all_colors.update(value) for value in colors.values()]
|
|
||||||
|
|
||||||
# Turn all those colors into util.Color instances for accessing the
|
# Turn all those colors into util.Color instances for accessing the
|
||||||
# .hex and .rgb formats
|
# .hex and .rgb formats
|
||||||
all_colors = {k: util.Color(v) for k, v in all_colors.items()}
|
all_colors = {k: util.Color(v) for k, v in all_colors.items()}
|
||||||
|
|
||||||
# pylint: disable=W0106
|
# 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)]
|
||||||
|
Loading…
Reference in New Issue
Block a user