[options] remove custom Formatter.format_help()

fixes superfluous newlines in --version output
This commit is contained in:
Mike Fährmann
2025-09-05 22:21:09 +02:00
parent 752f82f002
commit 35bf1a2a0a
2 changed files with 3 additions and 5 deletions

View File

@@ -222,10 +222,6 @@ class Formatter(argparse.HelpFormatter):
def _format_usage(self, usage, actions, groups, prefix):
return f"Usage: {self._prog} [OPTIONS] URL [URL...]\n"
def format_help(self):
return self._long_break_matcher.sub(
"\n\n", self._root_section.format_help())
def _parse_option(opt):
key, _, value = opt.partition("=")

View File

@@ -46,4 +46,6 @@ with util.lazy(PATH) as fp:
fp.write(f"""# Command-Line Options
<!-- auto-generated by {SELF} -->
{opts[:-1]}""")
{opts}""")