diff --git a/pywal/colors.py b/pywal/colors.py index 63200c5..246318c 100644 --- a/pywal/colors.py +++ b/pywal/colors.py @@ -4,7 +4,6 @@ Generate a palette using various backends. import logging import os import random -import re import sys from . import theme diff --git a/pywal/util.py b/pywal/util.py index b58f5e4..10fb42c 100644 --- a/pywal/util.py +++ b/pywal/util.py @@ -182,9 +182,11 @@ def get_pid(name): def hashf(fpath): + """Get the md5 hash of a file.""" return hashlib.md5(file_bytes(open(fpath, 'rb'))).hexdigest() def file_bytes(fpath): + """Helper function to read file.""" with fpath: return fpath.read()