From 51af3c1e03875716d224e40878f821dac931fc9a Mon Sep 17 00:00:00 2001 From: dgrisham Date: Wed, 17 Oct 2018 09:03:43 -0600 Subject: [PATCH] Fix lint errors. License: MIT Signed-off-by: David Grisham --- pywal/colors.py | 1 - pywal/util.py | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) 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()