Commit 841b930a authored by Berker Peksag's avatar Berker Peksag

Issue #17940: Remove redundant code from _Section.format_help()

Output of func(*args) stored in the next line:

    item_help = join([func(*args) for func, args in self.items])

_Section.items only used by HelpFormatter._add_item() and it looks
like it doesn't have any side effects.

Patch by Yogesh Chaudhari.
parent d79d5b1a
......@@ -210,8 +210,6 @@ class HelpFormatter(object):
if self.parent is not None:
self.formatter._indent()
join = self.formatter._join_parts
for func, args in self.items:
func(*args)
item_help = join([func(*args) for func, args in self.items])
if self.parent is not None:
self.formatter._dedent()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment