mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-02-18 03:01:03 +01:00
Fix lint errors.
License: MIT Signed-off-by: David Grisham <dgrisham@mines.edu>
This commit is contained in:
parent
b08648c720
commit
51af3c1e03
@ -4,7 +4,6 @@ Generate a palette using various backends.
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import re
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from . import theme
|
from . import theme
|
||||||
|
@ -182,9 +182,11 @@ def get_pid(name):
|
|||||||
|
|
||||||
|
|
||||||
def hashf(fpath):
|
def hashf(fpath):
|
||||||
|
"""Get the md5 hash of a file."""
|
||||||
return hashlib.md5(file_bytes(open(fpath, 'rb'))).hexdigest()
|
return hashlib.md5(file_bytes(open(fpath, 'rb'))).hexdigest()
|
||||||
|
|
||||||
|
|
||||||
def file_bytes(fpath):
|
def file_bytes(fpath):
|
||||||
|
"""Helper function to read file."""
|
||||||
with fpath:
|
with fpath:
|
||||||
return fpath.read()
|
return fpath.read()
|
||||||
|
Loading…
Reference in New Issue
Block a user