Skip to content

Commit

Permalink
Use brackets for the default value of option arguments
Browse files Browse the repository at this point in the history
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
  • Loading branch information
DimitriPapadopoulos committed Oct 31, 2024
1 parent dd61356 commit 0a1b733
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions twine/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 0a1b733

Please sign in to comment.