Skip to content

Stop handling help parsing with argparse #12691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025
Merged

Stop handling help parsing with argparse #12691

merged 1 commit into from
May 30, 2025

Conversation

silv-io
Copy link
Member

@silv-io silv-io commented May 30, 2025

Motivation

#12500 added top level handling of profiles before they get to the click parsing. However, this inadvertently also caught the help option parsing. This leads to a shortened help message on -h like this:

usage: localstack [-h] [--profile PROFILE]

options:
  -h, --help         show this help message and exit
  --profile PROFILE

By disabling help message parsing in the preceding argparse, we pass that flag to click again and receive our full help output.

Changes

  • Disable help parsing in argparse so that it is handled by click again

@silv-io silv-io requested a review from AlessandroLollo May 30, 2025 09:31
@silv-io silv-io requested review from thrau and alexrashed as code owners May 30, 2025 09:31
@silv-io silv-io added the semver: patch Non-breaking changes which can be included in patch releases label May 30, 2025
@silv-io silv-io added this to the 4.5 milestone May 30, 2025
Copy link

Test Results - Preflight, Unit

21 579 tests  ±0   19 927 ✅ ±0   6m 13s ⏱️ -5s
     1 suites ±0    1 652 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit ed65381. ± Comparison against base commit 6f6b50e.

Copy link

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 7s ⏱️ -1s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit ed65381. ± Comparison against base commit 6f6b50e.

Copy link

Test Results - Alternative Providers

597 tests   420 ✅  13m 41s ⏱️
  4 suites  177 💤
  4 files      0 ❌

Results for commit ed65381.

Copy link

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 20m 25s ⏱️
4 824 tests 4 282 ✅ 542 💤 0 ❌
4 830 runs  4 282 ✅ 548 💤 0 ❌

Results for commit ed65381.

Copy link

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 41m 24s ⏱️ +10s
4 469 tests ±0  4 080 ✅ ±0  389 💤 ±0  0 ❌ ±0 
4 471 runs  ±0  4 080 ✅ ±0  391 💤 ±0  0 ❌ ±0 

Results for commit ed65381. ± Comparison against base commit 6f6b50e.

@silv-io silv-io requested a review from gtsiolis May 30, 2025 10:49
Copy link
Member

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UX LGTM. Thanks for tackling this, @silv-io! 🏁

BEORE AFTER
Screenshot 2025-05-30 at 13 55 51 Screenshot 2025-05-30 at 13 55 41

@silv-io silv-io merged commit 1833df1 into master May 30, 2025
61 of 62 checks passed
@silv-io silv-io deleted the fix-help-option branch May 30, 2025 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants