From 78756cd17beeffd0479a4c2c3689cfd271f22c07 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 8 Oct 2022 23:06:39 +1100 Subject: [PATCH] Simplified imports --- src/PIL/DdsImagePlugin.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/PIL/DdsImagePlugin.py b/src/PIL/DdsImagePlugin.py index 7367be169..ad86ff976 100644 --- a/src/PIL/DdsImagePlugin.py +++ b/src/PIL/DdsImagePlugin.py @@ -12,7 +12,6 @@ Full text of the CC0 license: import io import struct from enum import IntEnum, IntFlag -from io import BytesIO from . import Image, ImageFile from ._binary import i32le as i32 @@ -286,7 +285,7 @@ class DdsImageFile(ImageFile.ImageFile): if len(header_bytes) != 120: msg = f"Incomplete header: {len(header_bytes)} bytes" raise OSError(msg) - header = BytesIO(header_bytes) + header = io.BytesIO(header_bytes) flags_, height, width = struct.unpack("<3I", header.read(12)) flags = DDSD(flags_)