Correct type when using PngStream with a context manager

This commit is contained in:
Andrew Murray 2026-05-02 15:40:47 +10:00
parent f82a8163d8
commit 408cec404a

View File

@ -400,6 +400,9 @@ class PngStream(ChunkStream):
self.text_memory = 0
def __enter__(self) -> PngStream:
return self
def check_text_memory(self, chunklen: int) -> None:
self.text_memory += chunklen
if self.text_memory > MAX_TEXT_MEMORY: