From 41f667c6f2b1a932e090d2956f1dd52cef9f1cb1 Mon Sep 17 00:00:00 2001 From: applemonkey496 <55333787+applemonkey496@users.noreply.github.com> Date: Tue, 18 Aug 2020 17:23:17 -0700 Subject: [PATCH] Fix syntax; update formatting --- src/PIL/Image.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index c046e6258..5830f0be1 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -1733,11 +1733,13 @@ class Image: ): # RGB or RGBA value for a P image value = self.palette.getcolor(value) - - if self.mode = "L": + + if self.mode == "L": if (type(xy[0]) is not int) or (type(xy[1]) is not int): - raise TypeError(f"Expected argument xy to be a tuple (int, int) but got { xy }") - + raise TypeError( + f"Expected argument xy to be a tuple (int, int) but got { xy }" + ) + return self.im.putpixel(xy, value) def remap_palette(self, dest_map, source_palette=None):