Fix hanging indents in png.py
@@ -248,11 +248,13 @@ def check_palette(palette):
seen_triple = True
if seen_triple and len(t) == 4:
raise ValueError(
- "palette entry %d: all 4-tuples must precede all 3-tuples" % i)
+ "palette entry %d: "
+ "all 4-tuples must precede all 3-tuples" % i)
for x in t:
if int(x) != x or not(0 <= x <= 255):
raise ValueError(
- "palette entry %d: values must be integer: 0 <= x <= 255" % i)
+ "palette entry %d: "
+ "values must be integer: 0 <= x <= 255" % i)
return p
def check_sizes(size, width, height):
@@ -1662,8 +1664,7 @@ class Reader:
# :file:format We get here with a file format error:
# when the available bytes (after decompressing) do not
# pack into exact rows.
- raise FormatError(
- 'Wrong size for decompressed IDAT chunk.')
+ raise FormatError('Wrong size for decompressed IDAT chunk.')
assert len(a) == 0
def validate_signature(self):
@@ -1694,8 +1695,7 @@ class Reader:
if not self.atchunk:
self.atchunk = self.chunklentype()
if self.atchunk is None:
- raise FormatError(
- 'This PNG file has no IDAT chunks.')
+ raise FormatError('This PNG file has no IDAT chunks.')
if self.atchunk[1] == b'IDAT':
return
self.process_chunk(lenient=lenient)
