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/addheader.py | 62 +++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'tools/scripts/addheader.py') diff --git a/tools/scripts/addheader.py b/tools/scripts/addheader.py index d040d8b5d6..fac35372de 100644 --- a/tools/scripts/addheader.py +++ b/tools/scripts/addheader.py @@ -34,39 +34,39 @@ f = open("files","rb") fname = f.readline() while (fname!=""): - fr = open(fname.strip(),"rb") - l = fr.readline() - bc=False - fsingle = fname.strip() + fr = open(fname.strip(),"rb") + l = fr.readline() + bc=False + fsingle = fname.strip() - if (fsingle.find("/")!=-1): - fsingle=fsingle[fsingle.rfind("/")+1:] - rep_fl="$filename" - rep_fi=fsingle - len_fl=len(rep_fl) - len_fi=len(rep_fi) - if (len_fi Date: Sun, 30 Oct 2016 18:57:40 +0100 Subject: style: Fix PEP8 whitespace issues in Python files Done with `autopep8 --select=E2,W2`, fixes: - E201 - Remove extraneous whitespace. - E202 - Remove extraneous whitespace. - E203 - Remove extraneous whitespace. - E211 - Remove extraneous whitespace. - E221 - Fix extraneous whitespace around keywords. - E222 - Fix extraneous whitespace around keywords. - E223 - Fix extraneous whitespace around keywords. - E224 - Remove extraneous whitespace around operator. - E225 - Fix missing whitespace around operator. - E226 - Fix missing whitespace around operator. - E227 - Fix missing whitespace around operator. - E228 - Fix missing whitespace around operator. - E231 - Add missing whitespace. - E231 - Fix various deprecated code (via lib2to3). - E241 - Fix extraneous whitespace around keywords. - E242 - Remove extraneous whitespace around operator. - E251 - Remove whitespace around parameter '=' sign. - E261 - Fix spacing after comment hash. - E262 - Fix spacing after comment hash. - E265 - Format block comments. - E271 - Fix extraneous whitespace around keywords. - E272 - Fix extraneous whitespace around keywords. - E273 - Fix extraneous whitespace around keywords. - E274 - Fix extraneous whitespace around keywords. - W291 - Remove trailing whitespace. - W293 - Remove trailing whitespace. --- tools/scripts/addheader.py | 56 +++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'tools/scripts/addheader.py') diff --git a/tools/scripts/addheader.py b/tools/scripts/addheader.py index fac35372de..573d5182f5 100644 --- a/tools/scripts/addheader.py +++ b/tools/scripts/addheader.py @@ -1,4 +1,4 @@ -header="""\ +header = """\ /*************************************************************************/ /* $filename */ /*************************************************************************/ @@ -29,44 +29,44 @@ header="""\ /*************************************************************************/ """ -f = open("files","rb") +f = open("files", "rb") fname = f.readline() -while (fname!=""): +while (fname != ""): - fr = open(fname.strip(),"rb") + fr = open(fname.strip(), "rb") l = fr.readline() - bc=False + bc = False fsingle = fname.strip() - if (fsingle.find("/")!=-1): - fsingle=fsingle[fsingle.rfind("/")+1:] - rep_fl="$filename" - rep_fi=fsingle - len_fl=len(rep_fl) - len_fi=len(rep_fi) - if (len_fi Date: Sun, 30 Oct 2016 19:05:14 +0100 Subject: 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. --- tools/scripts/addheader.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'tools/scripts/addheader.py') diff --git a/tools/scripts/addheader.py b/tools/scripts/addheader.py index 573d5182f5..7838e16ae0 100644 --- a/tools/scripts/addheader.py +++ b/tools/scripts/addheader.py @@ -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() - -- cgit v1.2.3 From c7bc44d5ad9aae4902280012f7654e2318cd910e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 1 Jan 2017 22:01:57 +0100 Subject: Welcome in 2017, dear changelog reader! That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games! --- tools/scripts/addheader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/scripts/addheader.py') diff --git a/tools/scripts/addheader.py b/tools/scripts/addheader.py index 7838e16ae0..056e807c81 100644 --- a/tools/scripts/addheader.py +++ b/tools/scripts/addheader.py @@ -6,7 +6,7 @@ header = """\ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ -- cgit v1.2.3