fix(sonar): document empty _Sink.flush (python:S1186)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mARTin-B78 2026-10-06 11:40:25 +02:00
parent 40c3db6831
commit 9a542cd198

View File

@ -65,7 +65,8 @@ class _Sink:
def __init__(self): self.buf = bytearray(); self.pos = 0
def write(self, b): self.buf += b; self.pos += len(b); return len(b)
def tell(self): return self.pos
def flush(self): pass
def flush(self):
pass # in-memory buffer, nothing to flush; zipfile just calls it
def drain(self):
out = bytes(self.buf); self.buf.clear(); return out