aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_vimdoc.py
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-12-23 07:08:49 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-12-23 07:08:49 +0100
commit2e280dac7df504b0681043647c8cc02abcbcc686 (patch)
tree81890b3d267bd53753064636d6d84b81eccbf9e7 /scripts/gen_vimdoc.py
parentd6593d850a9a628f4d2ecca85da6f3eda9b3abfa (diff)
downloadrneovim-2e280dac7df504b0681043647c8cc02abcbcc686.tar.gz
rneovim-2e280dac7df504b0681043647c8cc02abcbcc686.tar.bz2
rneovim-2e280dac7df504b0681043647c8cc02abcbcc686.zip
gen_vimdoc.py: lint #11593
Diffstat (limited to 'scripts/gen_vimdoc.py')
-rwxr-xr-xscripts/gen_vimdoc.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py
index 876d46c18f..3ceb5d99e2 100755
--- a/scripts/gen_vimdoc.py
+++ b/scripts/gen_vimdoc.py
@@ -141,7 +141,7 @@ def debug_this(cond, o):
try:
name = o.nodeName
o = o.toprettyxml(indent=' ', newl='\n')
- except:
+ except Exception:
pass
if ((callable(cond) and cond())
or (not callable(cond) and cond in o)):
@@ -271,8 +271,6 @@ def doc_wrap(text, prefix='', width=70, func=False, indent=None):
return result
-
-
def update_params_map(parent, ret_map, width=62):
"""Updates `ret_map` with name:desc key-value pairs extracted
from Doxygen XML node `parent`.
@@ -293,8 +291,7 @@ def update_params_map(parent, ret_map, width=62):
desc = ''
desc_node = get_child(node, 'parameterdescription')
if desc_node:
- desc = fmt_node_as_vimhelp(desc_node, width=width,
- indent=(' ' * len(name)))
+ desc = fmt_node_as_vimhelp(desc_node, width=width, indent=(" " * len(name)))
ret_map[name] = desc
return ret_map
@@ -399,8 +396,9 @@ def para_as_map(parent, indent='', width=62):
}
if is_inline(parent):
- chunks['text'] = clean_lines(doc_wrap(render_node(parent, ''),
- indent=indent, width=width).strip())
+ chunks["text"] = clean_lines(
+ doc_wrap(render_node(parent, ""), indent=indent, width=width).strip()
+ )
# Ordered dict of ordered lists.
groups = collections.OrderedDict([
@@ -606,7 +604,7 @@ def extract_from_xml(filename, mode, fmt_vimhelp):
desc = find_first(member, 'detaileddescription')
if desc:
for child in desc.childNodes:
- paras.append(para_as_map(child)) #, width=width, indent=indent))
+ paras.append(para_as_map(child))
if DEBUG:
print(textwrap.indent(
re.sub(r'\n\s*\n+', '\n',