[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2022-09-22 00:43:16 +00:00
parent f4fde29070
commit 95b8061e68

View File

@ -19,7 +19,7 @@ import warnings
from io import BytesIO
from math import ceil, log
from . import BmpImagePlugin, Image, ImageFile, PngImagePlugin, IcoImagePlugin
from . import BmpImagePlugin, IcoImagePlugin, Image, ImageFile, PngImagePlugin
from ._binary import i16le as i16
from ._binary import i32le as i32
from ._binary import o8
@ -37,10 +37,7 @@ def _save(im, fp, filename):
"sizes",
[(16, 16), (24, 24), (32, 32), (48, 48), (64, 64), (128, 128), (256, 256)],
)
hotspots = im.encoderinfo.get(
"hotspots",
[(0, 0) for i in range(len(sizes))]
)
hotspots = im.encoderinfo.get("hotspots", [(0, 0) for i in range(len(sizes))])
if len(hotspots) != len(sizes):
raise ValueError("Number of hotspots must be equal to number of cursor sizes")
@ -119,6 +116,7 @@ def _accept(prefix):
##
# Image plugin for Windows Cursor files.
class CurFile(IcoImagePlugin.IcoFile):
def __init__(self, buf):
"""