summaryrefslogtreecommitdiff
path: root/pywal
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2018-10-17 15:20:01 +1100
committerDylan Araps <dylan.araps@gmail.com>2018-10-17 15:20:01 +1100
commit72e3c02a2b40f7d232688cce007a4161a10e54ab (patch)
tree285acf0be93bddd2733e996256ca74459473eb4c /pywal
parent580f5b76bea82d31cf2c189b5db425c142d8cfec (diff)
general: fix lint
Diffstat (limited to 'pywal')
-rw-r--r--pywal/backends/wal.py2
-rw-r--r--pywal/theme.py11
2 files changed, 6 insertions, 7 deletions
diff --git a/pywal/backends/wal.py b/pywal/backends/wal.py
index 1a85e17..a75fdc5 100644
--- a/pywal/backends/wal.py
+++ b/pywal/backends/wal.py
@@ -24,7 +24,7 @@ def has_im():
if shutil.which("magick"):
return ["magick", "convert"]
- elif shutil.which("convert"):
+ if shutil.which("convert"):
return ["convert"]
logging.error("Imagemagick wasn't found on your system.")
diff --git a/pywal/theme.py b/pywal/theme.py
index 37936c5..fcd1dd1 100644
--- a/pywal/theme.py
+++ b/pywal/theme.py
@@ -100,7 +100,7 @@ def file(input_file, light=False):
theme_file = os.path.join(MODULE_DIR, "colorschemes", bri, theme_name)
# Find the theme file.
- if input_file == "random" or input_file == "random_dark":
+ if input_file in ("random", "random_dark"):
theme_file = get_random_theme()
elif input_file == "random_light":
@@ -118,8 +118,7 @@ def file(input_file, light=False):
os.path.basename(theme_file))
return parse(theme_file)
- else:
- logging.error("No %s colorscheme file found.", bri)
- logging.error("Try adding '-l' to set light themes.")
- logging.error("Try removing '-l' to set dark themes.")
- sys.exit(1)
+ logging.error("No %s colorscheme file found.", bri)
+ logging.error("Try adding '-l' to set light themes.")
+ logging.error("Try removing '-l' to set dark themes.")
+ sys.exit(1)