Replace slice and comparison with startswith

This commit is contained in:
Andrew Murray 2025-05-09 20:53:55 +10:00 committed by GitHub
parent 26be2ee1e4
commit 8eba937d99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,7 +12,7 @@ from PIL._binary import o32le as o32
def _accept(prefix: bytes) -> bool: def _accept(prefix: bytes) -> bool:
return prefix[:4] == b"RIFF" return prefix.startswith(b"RIFF")
def _save_frame(im: Image.Image, fp: BytesIO, info: dict[str, Any]) -> None: def _save_frame(im: Image.Image, fp: BytesIO, info: dict[str, Any]) -> None: