Cleanup: pep8 (indentation, spacing, long lines)
This commit is contained in:
@@ -26,7 +26,10 @@ def write_png(buf, width, height):
|
||||
import struct
|
||||
# reverse the vertical line order and add null bytes at the start
|
||||
width_byte_4 = width * 4
|
||||
raw_data = b"".join(b'\x00' + buf[span:span + width_byte_4] for span in range((height - 1) * width * 4, -1, - width_byte_4))
|
||||
raw_data = b"".join(
|
||||
b'\x00' + buf[span:span + width_byte_4]
|
||||
for span in range((height - 1) * width * 4, -1, - width_byte_4)
|
||||
)
|
||||
|
||||
def png_pack(png_tag, data):
|
||||
chunk_head = png_tag + data
|
||||
|
@@ -26,7 +26,10 @@ def write_png(buf, width, height):
|
||||
import struct
|
||||
# reverse the vertical line order and add null bytes at the start
|
||||
width_byte_4 = width * 4
|
||||
raw_data = b"".join(b'\x00' + buf[span:span + width_byte_4] for span in range((height - 1) * width * 4, -1, - width_byte_4))
|
||||
raw_data = b"".join(
|
||||
b'\x00' + buf[span:span + width_byte_4]
|
||||
for span in range((height - 1) * width * 4, -1, - width_byte_4)
|
||||
)
|
||||
|
||||
def png_pack(png_tag, data):
|
||||
chunk_head = png_tag + data
|
||||
|
Reference in New Issue
Block a user