summaryrefslogtreecommitdiff
path: root/pywal/colors.py
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2018-01-02 10:30:46 +1100
committerDylan Araps <dylan.araps@gmail.com>2018-01-02 10:30:46 +1100
commit296d3f54b9c104fbd31d7f12a5af3a8da490b245 (patch)
tree86a72baf71a3c9fcc49395519678cb62292b9ff4 /pywal/colors.py
parentd6515868618d6faa02ff96b5febd7351a453a74a (diff)
general: Add pylintrc.
Diffstat (limited to 'pywal/colors.py')
-rw-r--r--pywal/colors.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/pywal/colors.py b/pywal/colors.py
index b4ce44f..d59d94f 100644
--- a/pywal/colors.py
+++ b/pywal/colors.py
@@ -40,13 +40,13 @@ def gen_colors(img, color_count):
of hex colors."""
magick_command = has_im()
- for index in range(0, 20, 1):
- raw_colors = imagemagick(color_count + index, img, magick_command)
+ for i in range(0, 20, 1):
+ raw_colors = imagemagick(color_count + i, img, magick_command)
if len(raw_colors) > 16:
break
- elif index == 19:
+ elif i == 19:
print("colors: Imagemagick couldn't generate a suitable scheme",
"for the image. Exiting...")
sys.exit(1)
@@ -54,7 +54,7 @@ def gen_colors(img, color_count):
else:
print("colors: Imagemagick couldn't generate a %s color palette, "
"trying a larger palette size %s."
- % (color_count, color_count + index))
+ % (color_count, color_count + i))
return [re.search("#.{6}", str(col)).group(0) for col in raw_colors[1:]]
@@ -82,8 +82,8 @@ def sort_colors(img, colors):
colors["special"]["foreground"] = raw_colors[15]
colors["special"]["cursor"] = raw_colors[15]
- for index, color in enumerate(raw_colors):
- colors["colors"]["color%s" % index] = color
+ for i, color in enumerate(raw_colors):
+ colors["colors"]["color%s" % i] = color
return colors