From 97c8508f5e4f57b1048830d44e76e1f4517fd449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 30 Oct 2016 18:44:57 +0100 Subject: style: Start applying PEP8 to Python files, indentation issues Done with `autopep8 --select=E1`, fixes: - E101 - Reindent all lines. - E112 - Fix under-indented comments. - E113 - Fix over-indented comments. - E115 - Fix under-indented comments. - E116 - Fix over-indented comments. - E121 - Fix a badly indented line. - E122 - Fix a badly indented line. - E123 - Fix a badly indented line. - E124 - Fix a badly indented line. - E125 - Fix indentation undistinguish from the next logical line. - E126 - Fix a badly indented line. - E127 - Fix a badly indented line. - E128 - Fix a badly indented line. - E129 - Fix a badly indented line. --- tools/scripts/make_bmfhdr.py | 64 ++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'tools/scripts/make_bmfhdr.py') diff --git a/tools/scripts/make_bmfhdr.py b/tools/scripts/make_bmfhdr.py index 0f6f453004..3fa97c8fe1 100644 --- a/tools/scripts/make_bmfhdr.py +++ b/tools/scripts/make_bmfhdr.py @@ -3,7 +3,7 @@ import sys if (len(sys.argv)!=2): - print("Pass me a .fnt argument!") + print("Pass me a .fnt argument!") f = open(sys.argv[1],"rb") @@ -19,39 +19,39 @@ font_cc=0 while(l!=""): - fs = l.strip().find(" ") - if (fs==-1): - l=f.readline() - continue - t = l[0:fs] + fs = l.strip().find(" ") + if (fs==-1): + l=f.readline() + continue + t = l[0:fs] - dv = l[fs+1:].split(" ") - d = {} - for x in dv: - if (x.find("=")==-1): - continue - s = x.split("=") - d[ s[0] ] = s[1] + dv = l[fs+1:].split(" ") + d = {} + for x in dv: + if (x.find("=")==-1): + continue + s = x.split("=") + d[ s[0] ] = s[1] - if (t=="common"): - font_height=d["lineHeight"] - font_ascent=d["base"] + if (t=="common"): + font_height=d["lineHeight"] + font_ascent=d["base"] - if (t=="char"): - font_chars.append(d["id"]) - font_chars.append(d["x"]) - font_chars.append(d["y"]) - font_chars.append(d["width"]) - font_chars.append(d["height"]) - font_chars.append(d["xoffset"]) - font_chars.append(d["yoffset"]) - font_chars.append(d["xadvance"]) - font_cc+=1 + if (t=="char"): + font_chars.append(d["id"]) + font_chars.append(d["x"]) + font_chars.append(d["y"]) + font_chars.append(d["width"]) + font_chars.append(d["height"]) + font_chars.append(d["xoffset"]) + font_chars.append(d["yoffset"]) + font_chars.append(d["xadvance"]) + font_cc+=1 - l = f.readline() + l = f.readline() print("static const int _bi_font_"+name+"_height="+str(font_height)+";") @@ -60,11 +60,11 @@ print("static const int _bi_font_"+name+"_charcount="+str(font_cc)+";") cstr="static const int _bi_font_"+name+"_characters={" for i in range(len(font_chars)): - c=font_chars[i] - if (i>0): - cstr+=", " - cstr+=c + c=font_chars[i] + if (i>0): + cstr+=", " + cstr+=c cstr+=("};") -print(cstr) \ No newline at end of file +print(cstr) -- cgit v1.2.3