Skip to content

Commit 6128951

Browse files
committed
added docstring to bytes_repr to retrigger checks
1 parent 930dfc1 commit 6128951

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pydra/utils/hash.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,17 @@ def __bytes_repr__(self, cache: Cache) -> Iterator[bytes]:
107107

108108
@singledispatch
109109
def bytes_repr(obj: object, cache: Cache) -> Iterator[bytes]:
110+
"""Default implementation of hashing for generic objects. Single dispatch is used
111+
to provide hooks for class-specific implementations
112+
113+
Parameters
114+
----------
115+
obj: object
116+
the object to hash
117+
cache : Cache
118+
a dictionary object used to store a cache of previously cached objects to
119+
handle circular object references
120+
"""
110121
cls = obj.__class__
111122
yield f"{cls.__module__}.{cls.__name__}:{{".encode()
112123
dct: Dict[str, ty.Any]

0 commit comments

Comments
 (0)