Skip to content

Commit

Permalink
fix(tools): make memoize safe for args/kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nytelife26 committed Nov 6, 2021
1 parent 22fc284 commit 5246dcd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proselint/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ def wrapped(*args, **kwargs):
tempargdict = inspect.getcallargs(f, *args, **kwargs)

for item in list(tempargdict.items()):
signature += item[1].encode("utf-8")
if item[0] == "text":
signature += item[1].encode("utf-8")

key = hashlib.sha256(signature).hexdigest()
cache = _get_cache(cachepath)
Expand Down

0 comments on commit 5246dcd

Please sign in to comment.