From da0e0338ea0d2de80850f98452084ab0acf1c7a2 Mon Sep 17 00:00:00 2001 From: Yume05-dev <266928269+Yume05-dev@users.noreply.github.com> Date: Mon, 23 Mar 2026 03:51:33 -0400 Subject: [PATCH] docs: fix multiple typos, grammatical inconsistencies and formatting in CLI help strings and status messages --- httpie/cli/definition.py | 22 +++++++++++----------- httpie/plugins/builtin.py | 2 +- httpie/status.py | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/httpie/cli/definition.py b/httpie/cli/definition.py index 843b29c9cf..8eb9ecc584 100644 --- a/httpie/cli/definition.py +++ b/httpie/cli/definition.py @@ -194,7 +194,7 @@ '--boundary', short_help=( 'Specify a custom boundary string for multipart/form-data requests. ' - 'Only has effect only together with --form.' + 'Only has effect together with --form.'` o `'Has effect only together with --form.' ) ) content_types.add_argument( @@ -229,9 +229,9 @@ '-x', action='count', default=0, - short_help='Compress the content with Deflate algorithm.', + short_help='Compress the content with the Deflate algorithm.', help=""" - Content compressed (encoded) with Deflate algorithm. + Content compressed (encoded) with the Deflate algorithm. The Content-Encoding header is set to deflate. Compression is skipped if it appears that compression ratio is @@ -260,7 +260,7 @@ def format_style_help(available_styles, *, isolation_mode: bool = False): The "{auto_style}" style follows your terminal's ANSI color styles. For non-{auto_style} styles to work properly, please make sure that the $TERM environment variable is set to "xterm-256color" or similar - (e.g., via `export TERM=xterm-256color' in your ~/.bashrc). + (e.g., via \`export TERM=xterm-256color\` in your ~/.bashrc). """) if isolation_mode: @@ -507,7 +507,7 @@ def format_style_help(available_styles, *, isolation_mode: bool = False): default=False, short_help='Always stream the response body by line, i.e., behave like `tail -f`.', help=""" - Always stream the response body by line, i.e., behave like `tail -f'. + Always stream the response body by line, i.e., behave like `tail -f`. Without --stream and with --pretty (either set or implied), HTTPie fetches the whole response before it outputs the processed data. @@ -593,7 +593,7 @@ def format_style_help(available_styles, *, isolation_mode: bool = False): short_help='Create, or reuse and update a session.', help=""" Create, or reuse and update a session. Within a session, custom headers, - auth credential, as well as any cookies sent by the server persist between + auth credentials, as well as any cookies sent by the server persist between requests. Session files are stored in: @@ -611,7 +611,7 @@ def format_style_help(available_styles, *, isolation_mode: bool = False): type=session_name_validator, short_help='Create or read a session without updating it', help=""" - Create or read a session without updating it form the request/response + Create or read a session without updating it from the request/response exchange. """, @@ -824,7 +824,7 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False): '--ssl', dest='ssl_version', choices=sorted(AVAILABLE_SSL_VERSION_ARG_MAPPING.keys()), - short_help='The desired protocol version to used.', + short_help='The desired protocol version to use.', help=""" The desired protocol version to use. This will default to SSL v2.3 which will negotiate the highest protocol that both @@ -837,7 +837,7 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False): CIPHERS_CURRENT_DEFAULTS = ( """ - See `http --help` for the default ciphers list on you system. + See \`http --help\` for the default ciphers list on your system. """ if IS_MAN_PAGE else @@ -889,7 +889,7 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False): type=SSLCredentials, short_help='The passphrase to be used to with the given private key.', help=""" - The passphrase to be used to with the given private key. Only needed if --cert-key + The passphrase to be used with the given private key. Only needed if --cert-key is given and the key file requires a passphrase. If not provided, you’ll be prompted interactively. """ @@ -929,7 +929,7 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False): '--traceback', action='store_true', default=False, - short_help='Prints the exception traceback should one occur.', + short_help='Print the exception traceback should one occur.', ) troubleshooting.add_argument( '--default-scheme', diff --git a/httpie/plugins/builtin.py b/httpie/plugins/builtin.py index 860aebf7f9..5f0a927662 100644 --- a/httpie/plugins/builtin.py +++ b/httpie/plugins/builtin.py @@ -69,7 +69,7 @@ def get_auth( class BearerAuthPlugin(BuiltinAuthPlugin): - name = 'Bearer HTTP Auth' + name = 'Bearer HTTP auth' auth_type = 'bearer' netrc_parse = False auth_parse = False diff --git a/httpie/status.py b/httpie/status.py index 2abf291843..901ccbbf27 100644 --- a/httpie/status.py +++ b/httpie/status.py @@ -28,13 +28,13 @@ def http_status_to_exit_status(http_status: int, follow=False) -> ExitStatus: """ if 300 <= http_status <= 399 and not follow: - # Redirect + # Redirect. return ExitStatus.ERROR_HTTP_3XX elif 400 <= http_status <= 499: - # Client Error + # Client Error. return ExitStatus.ERROR_HTTP_4XX elif 500 <= http_status <= 599: - # Server Error + # Server Error. return ExitStatus.ERROR_HTTP_5XX else: return ExitStatus.SUCCESS