diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2016-10-30 18:57:40 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2016-11-01 00:35:16 +0100 |
commit | d4c17700aa2f36f69978beda04e42ff2749de270 (patch) | |
tree | 466f774d5fff723d6496e7259529c366fe01855a /doc/tools/makemd.py | |
parent | 97c8508f5e4f57b1048830d44e76e1f4517fd449 (diff) | |
download | redot-engine-d4c17700aa2f36f69978beda04e42ff2749de270.tar.gz |
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.
Diffstat (limited to 'doc/tools/makemd.py')
-rw-r--r-- | doc/tools/makemd.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/tools/makemd.py b/doc/tools/makemd.py index 2c9d697039..0693291f35 100644 --- a/doc/tools/makemd.py +++ b/doc/tools/makemd.py @@ -82,7 +82,7 @@ def make_class_list(class_list, columns): else: s += ' | ' - s += '[' + classname + '](class_'+ classname.lower()+') | ' + s += '[' + classname + '](class_' + classname.lower() + ') | ' s += '\n' f.write(s) @@ -126,14 +126,14 @@ def dokuize_text(text): if param.find('.') != -1: (class_param, method_param) = param.split('.') - tag_text = '['+class_param+'.'+method_param.replace("_","_")+'](' + class_param.lower() + '#' \ + tag_text = '[' + class_param + '.' + method_param.replace("_", "_") + '](' + class_param.lower() + '#' \ + method_param + ')' else: - tag_text = '[' + param.replace("_","_") + '](#' + param + ')' + tag_text = '[' + param.replace("_", "_") + '](#' + param + ')' elif cmd.find('image=') == 0: tag_text = '' elif cmd.find('url=') == 0: - tag_text = '[' + cmd[4:] + ']('+cmd[4:] + tag_text = '[' + cmd[4:] + '](' + cmd[4:] elif cmd == '/url': tag_text = ')' elif cmd == 'center': @@ -205,9 +205,9 @@ def make_method( # a.attrib["name"]=name+"_"+m.attrib["name"] # a.text=name+"::"+m.attrib["name"] - s += ' **'+m.attrib['name'].replace("_","_")+'** ' + s += ' **' + m.attrib['name'].replace("_", "_") + '** ' else: - s += ' **['+ m.attrib['name'].replace("_","_")+'](#' + m.attrib['name'] + ')** ' + s += ' **[' + m.attrib['name'].replace("_", "_") + '](#' + m.attrib['name'] + ')** ' s += ' **(**' argfound = False @@ -245,13 +245,13 @@ def make_doku_class(node): name = node.attrib['name'] - f = open("class_"+name.lower() + '.md', 'wb') + f = open("class_" + name.lower() + '.md', 'wb') f.write('# ' + name + ' \n') if 'inherits' in node.attrib: inh = node.attrib['inherits'].strip() - f.write('####**Inherits:** '+make_type(inh)+'\n') + f.write('####**Inherits:** ' + make_type(inh) + '\n') if 'category' in node.attrib: f.write('####**Category:** ' + node.attrib['category'].strip() + '\n') @@ -313,7 +313,7 @@ def make_doku_class(node): d = m.find('description') if d == None or d.text.strip() == '': continue - f.write('\n#### <a name="'+m.attrib['name']+'">' + m.attrib['name'] + '</a>\n') + f.write('\n#### <a name="' + m.attrib['name'] + '">' + m.attrib['name'] + '</a>\n') make_method(f, node.attrib['name'], m, True) f.write('\n') f.write(dokuize_text(d.text.strip())) |