summaryrefslogtreecommitdiff
path: root/pywal/export.py
diff options
context:
space:
mode:
authordylan <dylan.araps@gmail.com>2020-09-13 20:14:42 +0300
committerGitHub <noreply@github.com>2020-09-13 20:14:42 +0300
commit3647d3365bc295ad2bd960a852eb077a7ace5b13 (patch)
treeca868393bd729bc26240a22e562927533a1e8113 /pywal/export.py
parent807286ca22758ed22ede637e6acb8119b6f71312 (diff)
parent0ac6ef2a66a5c189250ffe0864bd0ab09cdb083b (diff)
Merge pull request #546 from ryuta69/fix_longline_for_flake8
[Test] Fix longline for flake8
Diffstat (limited to 'pywal/export.py')
-rw-r--r--pywal/export.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pywal/export.py b/pywal/export.py
index 1250528..47ea4d2 100644
--- a/pywal/export.py
+++ b/pywal/export.py
@@ -58,14 +58,18 @@ def template(colors, input_file, output_file=None):
# If the color was changed, replace with a unique identifier.
if new_color is not colors[cname]:
new_color = str(new_color)
- new_color_clean = new_color.replace('[', '_').replace(']', '_').replace('.', '_')
+ new_color_clean = (new_color.replace('[', '_')
+ .replace(']', '_')
+ .replace('.', '_'))
template_data[i] = l.replace(replace_str,
"color" + new_color_clean)
colors["color" + new_color_clean] = new_color
try:
template_data = "".join(template_data).format(**colors)
except (ValueError, KeyError, AttributeError) as exc:
- logging.error("Syntax error in template file '%s': %r.", input_file, exc)
+ logging.error(
+ "Syntax error in template file '%s': %r.",
+ input_file, exc)
return
util.save_file(template_data, output_file)