From fe38d93250f9c8f814e5233af07b5c25e4079615 Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 25 Dec 2019 17:44:05 +0200 Subject: [PATCH] Format with Black 19.10b0 --- src/PIL/BlpImagePlugin.py | 38 +++++++++++++++++++------------------- src/PIL/DdsImagePlugin.py | 2 +- src/PIL/FtexImagePlugin.py | 2 +- src/PIL/Image.py | 4 ++-- src/PIL/TiffImagePlugin.py | 12 ++++++------ 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/PIL/BlpImagePlugin.py b/src/PIL/BlpImagePlugin.py index 7b97964a8..dd1745158 100644 --- a/src/PIL/BlpImagePlugin.py +++ b/src/PIL/BlpImagePlugin.py @@ -119,7 +119,7 @@ def decode_dxt3(data): bits = struct.unpack_from("<8B", block) color0, color1 = struct.unpack_from(" 4: - offset, = struct.unpack("L", data) + (offset,) = struct.unpack(">L", data) self.fp.seek(offset) camerainfo = {"ModelID": self.fp.read(4)} diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py index a927cd3ed..0661c2ffb 100644 --- a/src/PIL/TiffImagePlugin.py +++ b/src/PIL/TiffImagePlugin.py @@ -484,7 +484,7 @@ class ImageFileDirectory_v2(MutableMapping): else: raise SyntaxError("not a TIFF IFD") self.reset() - self.next, = self._unpack("L", ifh[4:]) + (self.next,) = self._unpack("L", ifh[4:]) self._legacy_api = False prefix = property(lambda self: self._prefix) @@ -595,7 +595,7 @@ class ImageFileDirectory_v2(MutableMapping): ]: # rationals values = (values,) try: - dest[tag], = values + (dest[tag],) = values except ValueError: # We've got a builtin tag with 1 expected entry warnings.warn( @@ -765,7 +765,7 @@ class ImageFileDirectory_v2(MutableMapping): size = count * unit_size if size > 4: here = fp.tell() - offset, = self._unpack("L", data) + (offset,) = self._unpack("L", data) if DEBUG: print( "Tag Location: %s - Data Location: %s" % (here, offset), @@ -797,7 +797,7 @@ class ImageFileDirectory_v2(MutableMapping): else: print("- value:", self[tag]) - self.next, = self._unpack("L", self._ensure_read(fp, 4)) + (self.next,) = self._unpack("L", self._ensure_read(fp, 4)) except IOError as msg: warnings.warn(str(msg)) return @@ -1809,11 +1809,11 @@ class AppendingTiffWriter: return self.f.write(data) def readShort(self): - value, = struct.unpack(self.shortFmt, self.f.read(2)) + (value,) = struct.unpack(self.shortFmt, self.f.read(2)) return value def readLong(self): - value, = struct.unpack(self.longFmt, self.f.read(4)) + (value,) = struct.unpack(self.longFmt, self.f.read(4)) return value def rewriteLastShortToLong(self, value):