From 1d846c280707a47c5a7b218e25dad62fb0f030a5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 04:28:59 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/PIL/CurImagePlugin.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/PIL/CurImagePlugin.py b/src/PIL/CurImagePlugin.py index dca7f7d56..29c6479ac 100644 --- a/src/PIL/CurImagePlugin.py +++ b/src/PIL/CurImagePlugin.py @@ -150,16 +150,17 @@ class CurFile(IcoImagePlugin.IcoFile): if not icon_header[j]: icon_header[j] = 256 - icon_header["dim"] = (icon_header["width"], icon_header["height"]) icon_header["square"] = icon_header["width"] * icon_header["height"] # TODO: This needs further investigation. Cursor files do not really specify their bpp # like ICO's as those bits are used for the y_hotspot. For now, bpp is calculated by - # subtracting the AND mask (equal to number of pixels * 1bpp) and dividing by the number + # subtracting the AND mask (equal to number of pixels * 1bpp) and dividing by the number # of pixels. BITMAP_INFO_HEADER_SIZE = 40 - icon_header["bpp"] = (icon_header["size"] - BITMAP_INFO_HEADER_SIZE) * 8 - (icon_header["square"]) // icon_header["square"] + icon_header["bpp"] = (icon_header["size"] - BITMAP_INFO_HEADER_SIZE) * 8 - ( + icon_header["square"] + ) // icon_header["square"] self.entry.append(icon_header)