From a997f409a34f416117e5e1e3ba9e714dc1625053 Mon Sep 17 00:00:00 2001 From: Alan Du Date: Tue, 17 Oct 2023 23:57:20 -0400 Subject: [PATCH] Add assert instead of type-ignore --- fsspec/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fsspec/utils.py b/fsspec/utils.py index eae6159f6..c7e3e3ddc 100644 --- a/fsspec/utils.py +++ b/fsspec/utils.py @@ -296,7 +296,10 @@ def read_block( length = end - start f.seek(offset) - b = f.read(length) # type: ignore[arg-type] + + # TODO: allow length to be None and read to the end of the file? + assert length is not None + b = f.read(length) return b