Skip to content

Commit 451165b

Browse files
committed
fixup! Add typehints to fsspec.utils
1 parent 9dc6045 commit 451165b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fsspec/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,11 @@ def tokenize(*args: Any, **kwargs: Any) -> str:
316316
if kwargs:
317317
args += (kwargs,)
318318
try:
319-
return md5(str(args).encode()).hexdigest()
319+
h = md5(str(args).encode())
320320
except ValueError:
321321
# FIPS systems: https://github.com/fsspec/filesystem_spec/issues/380
322-
return md5(str(args).encode(), usedforsecurity=False).hexdigest() # type: ignore[call-arg]
322+
h = md5(str(args).encode(), usedforsecurity=False) # type: ignore[call-arg]
323+
return h.hexdigest()
323324

324325

325326
def stringify_path(filepath: str | os.PathLike[str] | pathlib.Path) -> str:

0 commit comments

Comments
 (0)