scripts: add empty lines around class/function definitions

This commit is contained in:
Anton Shestakov
2018-07-26 08:27:56 +08:00
parent 97b93420d8
commit 0080a95461
4 changed files with 9 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ SOFTWARE.
from PIL import Image
class Infile:
def __init__(self, fname):
self.fname = fname
@@ -56,6 +57,7 @@ class Infile:
data.append(self.getByte())
return data
def decode_xy(pix_idx, w, h):
y = pix_idx // w
x = pix_idx - w * y
@@ -63,6 +65,7 @@ def decode_xy(pix_idx, w, h):
assert y >= 0 and y < h
return x, y
def get_colour(table, idx):
if table == 0:
return (0, 0, 0, 255)
@@ -78,6 +81,7 @@ def get_colour(table, idx):
return (idx, 0, idx, 255)
assert False
class Sprite:
def __init__(self, infile):
size = infile.getLong() - 2 - 2 - 2