From 388589bc823fb182c84f868ba0f53e744e34015a Mon Sep 17 00:00:00 2001 From: Andy Kluger Date: Tue, 28 Sep 2021 13:16:22 -0400 Subject: [PATCH] Improve clarity of help text for options supporting multiple (#1492) --- piptools/scripts/compile.py | 12 +++++++----- piptools/scripts/sync.py | 11 ++++++++--- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/piptools/scripts/compile.py b/piptools/scripts/compile.py index b37759ba8..0c29eb090 100755 --- a/piptools/scripts/compile.py +++ b/piptools/scripts/compile.py @@ -75,13 +75,13 @@ def _get_default_option(option_name: str) -> Any: "--extra", "extras", multiple=True, - help="Names of extras_require to install", + help="Name of an extras_require group to install; may be used more than once", ) @click.option( "-f", "--find-links", multiple=True, - help="Look for archives in this directory or on this HTML page", + help="Look for archives in this directory or on this HTML page; may be used more than once", ) @click.option( "-i", @@ -91,7 +91,9 @@ def _get_default_option(option_name: str) -> Any: ), ) @click.option( - "--extra-index-url", multiple=True, help="Add additional index URL to search" + "--extra-index-url", + multiple=True, + help="Add another index URL to search; may be used more than once", ) @click.option("--cert", help="Path to alternate CA bundle.") @click.option( @@ -103,7 +105,7 @@ def _get_default_option(option_name: str) -> Any: "--trusted-host", multiple=True, help="Mark this host as trusted, even though it does not have " - "valid or any HTTPS.", + "valid or any HTTPS; may be used more than once", ) @click.option( "--header/--no-header", @@ -142,7 +144,7 @@ def _get_default_option(option_name: str) -> Any: "upgrade_packages", nargs=1, multiple=True, - help="Specify particular packages to upgrade.", + help="Specify a particular package to upgrade; may be used more than once", ) @click.option( "-o", diff --git a/piptools/scripts/sync.py b/piptools/scripts/sync.py index 10f4221c7..8a6c75272 100755 --- a/piptools/scripts/sync.py +++ b/piptools/scripts/sync.py @@ -48,16 +48,21 @@ "-f", "--find-links", multiple=True, - help="Look for archives in this directory or on this HTML page", + help="Look for archives in this directory or on this HTML page; may be used more than once", ) @click.option("-i", "--index-url", help="Change index URL (defaults to PyPI)") @click.option( - "--extra-index-url", multiple=True, help="Add additional index URL to search" + "--extra-index-url", + multiple=True, + help="Add another index URL to search; may be used more than once", ) @click.option( "--trusted-host", multiple=True, - help="Mark this host as trusted, even though it does not have valid or any HTTPS.", + help=( + "Mark this host as trusted, even though it does not have valid or any HTTPS" + "; may be used more than once" + ), ) @click.option( "--no-index",