Skip to content

Commit

Permalink
touch up comments again
Browse files Browse the repository at this point in the history
  • Loading branch information
tclose committed Feb 29, 2024
1 parent 3076fea commit a094fbc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pydra/utils/hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,13 @@ def calc_hash(first: ty.Optional[bytes] = None) -> Hash:
h.update(chunk)
return Hash(h.digest())

# Read the first item of the bytes_repr iterator and check to see whether it returns
# Read the first item of the bytes_repr iterator and check to see whether it yields
# a "cache-key" tuple instead of a bytes chunk for the type of the object to be cached
# (e.g. fileformats.core.FileSet objects). If it does use that key to check the
# persistent cache for a precomputed hash and return it if it is, otherwise
# calculate the hash and store it in the persistent cache with that hash of
# that key (not to be confused with the hash of the object that is saved/retrieved).
# (e.g. file-system path + mtime for fileformats.core.FileSet objects). If it
# does, use that key to check the persistent cache for a precomputed hash and
# return it if it is, otherwise calculate the hash and store it in the persistent
# cache with that hash of that key (not to be confused with the hash of the
# object that is saved/retrieved).
first = next(bytes_it)
if isinstance(first, tuple):
tp = type(obj)
Expand Down

0 comments on commit a094fbc

Please sign in to comment.