[Misc] Skip hashing kwargs if value is None (#32025)

Signed-off-by: Roger Wang <hey@rogerw.io>
This commit is contained in:
Roger Wang
2026-01-09 05:20:59 -08:00
committed by GitHub
parent e02706d2d2
commit db07433ce5

View File

@@ -98,6 +98,9 @@ class MultiModalHasher:
key: str,
obj: object,
) -> Iterable[bytes | memoryview]:
if obj is None:
yield key.encode("utf-8")
return
# Recursive cases
if isinstance(obj, (list, tuple)):
for i, elem in enumerate(obj):