style: Fix PEP8 blank lines issues in Python files

Done with `autopep8 --select=E3,W3`, fixes:

- E301 - Add missing blank line.
- E302 - Add missing 2 blank lines.
- E303 - Remove extra blank lines.
- E304 - Remove blank line following function decorator.
- E309 - Add missing blank line.
- W391 - Remove trailing blank lines.
This commit is contained in:
Rémi Verschelde 2016-10-30 19:05:14 +01:00
parent d4c17700aa
commit 817dd7ccbb
53 changed files with 115 additions and 193 deletions

View file

@ -56,7 +56,6 @@ while (fname != ""):
else:
text = header.replace("$filename", fsingle)
while (l != ""):
if ((l.find("//") != 0 and l.find("/*") != 0 and l.strip() != "") or bc):
text += l
@ -69,4 +68,3 @@ while (fname != ""):
fr.close()
# print(text)
fname = f.readline()

View file

@ -2,6 +2,7 @@ import binascii
import os.path
import sys
def tof(filepath):
with open(filepath, 'r') as f:
content = f.read()
@ -15,6 +16,7 @@ def tof(filepath):
print(os.path.basename(filepath) + ".file created.")
exit(0)
def toa(filepath):
with open(filepath, 'rb') as f:
content = f.read()
@ -28,6 +30,7 @@ def toa(filepath):
print(os.path.basename(filepath) + ".array created.")
exit(0)
def usage():
print("========================================================\n\
#\n\

View file

@ -33,7 +33,6 @@ while(l != ""):
s = x.split("=")
d[s[0]] = s[1]
if (t == "common"):
font_height = d["lineHeight"]
font_ascent = d["base"]
@ -49,8 +48,6 @@ while(l != ""):
font_chars.append(d["xadvance"])
font_cc += 1
l = f.readline()

View file

@ -87,7 +87,6 @@ for x in (range(len(sys.argv) - 1)):
print(funcdata)
# print(types)
# print(constants)
# print(functions)
@ -177,7 +176,3 @@ for x in functions:
f.write("\n\n")
f.write("}\n")
f.write("\n\n")

View file

@ -64,7 +64,6 @@ text = """
"""
for i in range(1, 8):
tp = ""
@ -81,8 +80,3 @@ for i in range(1, 8):
t = text.replace("$argtp", tp).replace("$argp", p).replace("$argt", t).replace("$num", str(i))
print(t)

View file

@ -73,7 +73,6 @@ def export_icons():
svg_to_png(source_path, theme_dir_base + theme_out_icon_name, 90)
def export_theme():
svgs_path = theme_dir_source
file_names = [f for f in listdir(svgs_path) if isfile(join(svgs_path, f))]