diff options
| author | dgrisham <[email protected]> | 2018-10-17 09:03:43 -0600 |
|---|---|---|
| committer | dgrisham <[email protected]> | 2018-10-17 09:03:50 -0600 |
| commit | 51af3c1e03875716d224e40878f821dac931fc9a (patch) | |
| tree | bb8f7b6a45aa0a87cffc38142af982cc94e4aae8 | |
| parent | move hashf() to util.py (diff) | |
| download | pywal-51af3c1e03875716d224e40878f821dac931fc9a.tar.xz pywal-51af3c1e03875716d224e40878f821dac931fc9a.zip | |
Fix lint errors.
License: MIT
Signed-off-by: David Grisham <[email protected]>
| -rw-r--r-- | pywal/colors.py | 1 | ||||
| -rw-r--r-- | pywal/util.py | 2 |
2 files changed, 2 insertions, 1 deletions
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() |