We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7384419 commit 2cc52f2Copy full SHA for 2cc52f2
src/sfnttools/utils/stream.py
@@ -13,9 +13,9 @@ def __init__(self, source: bytes | BinaryIO | None = None):
13
source = BytesIO(source)
14
self.source = source
15
16
- def read(self, size: int) -> bytes:
+ def read(self, size: int, ignore_eof: bool = False) -> bytes:
17
values = self.source.read(size)
18
- if len(values) < size:
+ if len(values) < size and not ignore_eof:
19
raise EOFError()
20
return values
21
0 commit comments