From 0a1b733b668056298ffc20b363f9bf83c4a18701 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sat, 21 Sep 2024 10:18:27 +0200 Subject: [PATCH] Use brackets for the default value of option arguments The goal is to standardize the format of the help text printed by pypa commands. It is not easy to choose between brackets `[]` and parentheses `()`. I went for the docopt style, which is the closest to a standard I could find: http://docopt.org/ [...] and whether that argument has a default value ([default: 10]). This change has already been applied to setuptools: pypa/setuptools#4442 --- twine/settings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/twine/settings.py b/twine/settings.py index 9f3aefb1..5aa4d964 100644 --- a/twine/settings.py +++ b/twine/settings.py @@ -165,8 +165,8 @@ def register_argparse_arguments(parser: argparse.ArgumentParser) -> None: env="TWINE_REPOSITORY", default="pypi", help="The repository (package index) to upload the package to. " - "Should be a section in the config file (default: " - "%(default)s). (Can also be set via %(env)s environment " + "Should be a section in the config file [default: " + "%(default)s]. (Can also be set via %(env)s environment " "variable.)", ) parser.add_argument( @@ -195,7 +195,7 @@ def register_argparse_arguments(parser: argparse.ArgumentParser) -> None: parser.add_argument( "--sign-with", default="gpg", - help="GPG program used to sign uploads (default: %(default)s).", + help="GPG program used to sign uploads [default: %(default)s].", ) parser.add_argument( "-i",