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 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 distutils:
	pypa/distutils#262
  • Loading branch information
DimitriPapadopoulos committed Jun 28, 2024
1 parent 1e00742 commit 84efd41
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/wheel/bdist_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class bdist_wheel(Command):
"plat-name=",
"p",
"platform name to embed in generated filenames "
f"(default: {get_platform(None)})",
f"[default: {get_platform(None)}]",
),
(
"keep-temp",
Expand All @@ -192,7 +192,7 @@ class bdist_wheel(Command):
(
"relative",
None,
"build the archive using relative paths (default: false)",
"build the archive using relative paths [default: false]",
),
(
"owner=",
Expand All @@ -204,18 +204,18 @@ class bdist_wheel(Command):
"g",
"Group name used when creating a tar file [default: current group]",
),
("universal", None, "make a universal wheel (default: false)"),
("universal", None, "make a universal wheel [default: false]"),
(
"compression=",
None,
"zipfile compression (one of: {}) (default: 'deflated')".format(
"zipfile compression (one of: {}) [default: 'deflated']".format(
", ".join(supported_compressions)
),
),
(
"python-tag=",
None,
f"Python implementation compatibility tag (default: '{python_tag()}')",
f"Python implementation compatibility tag [default: '{python_tag()}']",
),
(
"build-number=",
Expand All @@ -227,7 +227,7 @@ class bdist_wheel(Command):
(
"py-limited-api=",
None,
"Python tag (cp32|cp33|cpNN) for abi3 wheel tag (default: false)",
"Python tag (cp32|cp33|cpNN) for abi3 wheel tag [default: false]",
),
]

Expand Down

0 comments on commit 84efd41

Please sign in to comment.