Skip to content

Commit 067412e

Browse files
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
1 parent f32dc35 commit 067412e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

twine/settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ def register_argparse_arguments(parser: argparse.ArgumentParser) -> None:
165165
env="TWINE_REPOSITORY",
166166
default="pypi",
167167
help="The repository (package index) to upload the package to. "
168-
"Should be a section in the config file (default: "
169-
"%(default)s). (Can also be set via %(env)s environment "
168+
"Should be a section in the config file [default: "
169+
"%(default)s]. (Can also be set via %(env)s environment "
170170
"variable.)",
171171
)
172172
parser.add_argument(
@@ -195,7 +195,7 @@ def register_argparse_arguments(parser: argparse.ArgumentParser) -> None:
195195
parser.add_argument(
196196
"--sign-with",
197197
default="gpg",
198-
help="GPG program used to sign uploads (default: %(default)s).",
198+
help="GPG program used to sign uploads [default: %(default)s].",
199199
)
200200
parser.add_argument(
201201
"-i",

0 commit comments

Comments
 (0)