From 35bf1a2a0aef97f651c8a00c77af7334b4043f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 5 Sep 2025 22:21:09 +0200 Subject: [PATCH] [options] remove custom Formatter.format_help() fixes superfluous newlines in --version output --- gallery_dl/option.py | 4 ---- scripts/options.py | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/gallery_dl/option.py b/gallery_dl/option.py index a6ada888..05cc9d35 100644 --- a/gallery_dl/option.py +++ b/gallery_dl/option.py @@ -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("=") diff --git a/scripts/options.py b/scripts/options.py index 0fd8d646..c71a53ea 100755 --- a/scripts/options.py +++ b/scripts/options.py @@ -46,4 +46,6 @@ with util.lazy(PATH) as fp: fp.write(f"""# Command-Line Options -{opts[:-1]}""") + + +{opts}""")