Cleanup: pep8 (indentation, spacing, long lines)

This commit is contained in:
2020-10-02 10:15:51 +10:00
parent bab9de2a52
commit 41d2d6da0c
104 changed files with 683 additions and 493 deletions

View File

@@ -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

View File

@@ -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