From a5f7d1e0f21ed2b00215179a02c4af44b69ea013 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli <zack@upsilon.cc> Date: Sun, 14 Jan 2018 14:39:45 +0100 Subject: [PATCH] improve hash_file() docstring to specify algorithms type --- swh/model/hashutil.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/swh/model/hashutil.py b/swh/model/hashutil.py index 96905d95..0dfbdc34 100644 --- a/swh/model/hashutil.py +++ b/swh/model/hashutil.py @@ -122,8 +122,9 @@ def hash_file(fobj, length=None, algorithms=DEFAULT_ALGORITHMS, chunk_cb=None): Args: fobj: a file-like object length: the length of the contents of the file-like object (for the - git-specific algorithms) - algorithms: the hashing algorithms used + git-specific algorithms) + algorithms: the hashing algorithms to be used, as an iterable over + strings Returns: a dict mapping each algorithm to a bytes digest. -- GitLab