Skip to content

Commit

Permalink
fix: help: Wrap project blurb at 80 chars.
Browse files Browse the repository at this point in the history
This makes the project blurb consistent with the GNU style implemented
for the rest of the help (-h) message.
  • Loading branch information
badshah400 committed Feb 26, 2024
1 parent 7536268 commit 106ab7e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/tartex/_parse_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ def __init__(self, prog):
"""
Initialise
"""
argparse.HelpFormatter.__init__(self, prog, max_help_position=30)
argparse.HelpFormatter.__init__(
self, prog, max_help_position=30, width=80
)

def _format_action_invocation(self, action):
if not action.option_strings:
Expand Down Expand Up @@ -310,7 +312,7 @@ def parse_args(args):
metavar="NAME[.SUF]",
type=Path,
help="output tar file name; tar compression mode will be inferred from"
" .SUF, if possible (default 'gz')",
" .SUF, if possible (default 'gz')",
)

parser.add_argument(
Expand Down Expand Up @@ -360,10 +362,7 @@ def parse_args(args):
tar_opts = parser.add_mutually_exclusive_group()

def cmp_str(cmp, ext):
return (
f"{cmp} (tar.{ext}) mode"
" (overrides .SUF in '--output')"
)
return f"Recompress with {cmp} (.{ext})" " (overrides .SUF in '-o')"

tar_opts.add_argument(
"-j",
Expand Down

0 comments on commit 106ab7e

Please sign in to comment.