Skip to content

Commit

Permalink
Add assert instead of type-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
alanhdu committed Oct 18, 2023
1 parent 18f99f0 commit a997f40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fsspec/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit a997f40

Please sign in to comment.