diff options
author | Daniel Hahler <git@thequod.de> | 2019-07-29 04:43:49 +0200 |
---|---|---|
committer | Daniel Hahler <git@thequod.de> | 2019-07-29 22:14:23 +0200 |
commit | d7b04ae7a713412ac2882d1c6c2fce70ebb5766e (patch) | |
tree | 0e524906a7450d889bbf11c380fae7e1270439de /scripts | |
parent | 97ce776e7ba68d1966fddba475b11e85a6c53420 (diff) | |
download | rneovim-d7b04ae7a713412ac2882d1c6c2fce70ebb5766e.tar.gz rneovim-d7b04ae7a713412ac2882d1c6c2fce70ebb5766e.tar.bz2 rneovim-d7b04ae7a713412ac2882d1c6c2fce70ebb5766e.zip |
py: flake8 fixes
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-includes.py | 2 | ||||
-rw-r--r-- | scripts/gen_help_html.py | 2 | ||||
-rwxr-xr-x | scripts/gen_vimdoc.py | 15 |
3 files changed, 9 insertions, 10 deletions
diff --git a/scripts/check-includes.py b/scripts/check-includes.py index 735fb393dd..ed1fe407c5 100755 --- a/scripts/check-includes.py +++ b/scripts/check-includes.py @@ -22,8 +22,6 @@ def main(argv): args = argparser.parse_args(argv) with args.file: - include_dirs = [] - iwyu = Popen(['include-what-you-use', '-xc'] + args.iwyu_args + ['/dev/stdin'], stdin=PIPE, stdout=PIPE, stderr=PIPE) diff --git a/scripts/gen_help_html.py b/scripts/gen_help_html.py index a319cde64e..0b8e77ac22 100644 --- a/scripts/gen_help_html.py +++ b/scripts/gen_help_html.py @@ -86,7 +86,7 @@ SITENAVI_SEARCH = '<table width="100%"><tbody><tr><td>' + SITENAVI_LINKS_WEB + \ TEXTSTART = """ <div id="d1"> -<pre id="sp"> </pre> +<pre id="sp">""" + (" " * 80) + """</pre> <div id="d2"> <pre> """ diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py index 3364a83206..edfb38e617 100755 --- a/scripts/gen_vimdoc.py +++ b/scripts/gen_vimdoc.py @@ -36,7 +36,6 @@ import shutil import textwrap import subprocess import collections -import pprint from xml.dom import minidom @@ -295,10 +294,9 @@ def render_params(parent, width=62): out += '{}{}\n'.format(name, desc) return out.rstrip() -# Renders a node as Vim help text, recursively traversing all descendants. - def render_node(n, text, prefix='', indent='', width=62): + """Renders a node as Vim help text, recursively traversing all descendants.""" text = '' # space_preceding = (len(text) > 0 and ' ' == text[-1][-1]) # text += (int(not space_preceding) * ' ') @@ -322,9 +320,11 @@ def render_node(n, text, prefix='', indent='', width=62): text += ' [verbatim] {}'.format(get_text(n)) elif n.nodeName == 'listitem': for c in n.childNodes: - text += indent + prefix + \ - render_node(c, text, indent=indent + - (' ' * len(prefix)), width=width) + text += ( + indent + + prefix + + render_node(c, text, indent=indent + (' ' * len(prefix)), width=width) + ) elif n.nodeName in ('para', 'heading'): for c in n.childNodes: text += render_node(c, text, indent=indent, width=width) @@ -693,7 +693,8 @@ def gen_docs(config): for filename in CONFIG[mode]['section_order']: if filename not in sections: raise RuntimeError( - 'found new module "{}"; update the "section_order" map'.format(filename)) + 'found new module "{}"; update the "section_order" map'.format( + filename)) title, helptag, section_doc = sections.pop(filename) i += 1 if filename not in CONFIG[mode]['append_only']: |