From 067412e84cfdd39929d838075ef8fa3d2cb0d733 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sat, 30 Nov 2024 16:46:13 +0100 Subject: [PATCH] Use brackets for the default value of option arguments (#1149) 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",