diff options
| -rw-r--r-- | pywal/__main__.py | 2 | ||||
| -rw-r--r-- | pywal/magic.py | 6 | ||||
| -rw-r--r-- | pywal/sequences.py | 7 | ||||
| -rw-r--r-- | pywal/template.py | 5 |
4 files changed, 10 insertions, 10 deletions
diff --git a/pywal/__main__.py b/pywal/__main__.py index 5adf038..bc772ec 100644 --- a/pywal/__main__.py +++ b/pywal/__main__.py @@ -68,7 +68,7 @@ def process_args(args): sys.stdout = sys.stderr = open(os.devnull, "w") if args.c: - shutil.rmtree(wal.CACHE_DIR / "schemes") + shutil.rmtree(wal.CACHE_DIR / "schemes", ignore_errors=True) if args.r: wal.reload_colors(args.t) diff --git a/pywal/magic.py b/pywal/magic.py index b384b97..757fdce 100644 --- a/pywal/magic.py +++ b/pywal/magic.py @@ -83,10 +83,10 @@ def sort_colors(img, colors): colors_special.update({"cursor": raw_colors[15]}) colors_hex = {} - [colors_hex.update({f"color{index}": color}) # pylint: disable=W0106 - for index, color in enumerate(raw_colors)] - colors_hex["color8"] = util.set_grey(raw_colors) + for index, color in enumerate(raw_colors): + colors_hex.update({f"color{index}": color}) + colors_hex["color8"] = util.set_grey(raw_colors) colors["special"] = colors_special colors["colors"] = colors_hex diff --git a/pywal/sequences.py b/pywal/sequences.py index d7f1fa9..c1a7bdd 100644 --- a/pywal/sequences.py +++ b/pywal/sequences.py @@ -44,9 +44,10 @@ def send_sequences(colors, vte, cache_dir): if len(term) < 4] terminals.append(cache_dir / "sequences") - # Send the sequences to all open terminals. - # pylint: disable=W0106 - [util.save_file("".join(sequences), term) for term in terminals] + # Writing to "/dev/pts/[0-9] lets you send data to open terminals. + for term in terminals: + util.save_file("".join(sequences), term) + print("colors: Set terminal colors") diff --git a/pywal/template.py b/pywal/template.py index 1dc72bf..210e45e 100644 --- a/pywal/template.py +++ b/pywal/template.py @@ -26,6 +26,5 @@ def export_all_templates(colors, output_dir, template_dir=None): **colors["colors"]} all_colors = {k: util.Color(v) for k, v in all_colors.items()} - # pylint: disable=W0106 - [template(all_colors, file.path, output_dir) - for file in os.scandir(template_dir)] + for file in os.scandir(template_dir): + template(all_colors, file.path, output_dir) |
