Skip to content

Fix NameError in ParamUnknownKeyError formatting#10406

Merged
ashovlin merged 1 commit into
aws:developfrom
Dreamstick9:fix-param-unknown-key-error
Jun 19, 2026
Merged

Fix NameError in ParamUnknownKeyError formatting#10406
ashovlin merged 1 commit into
aws:developfrom
Dreamstick9:fix-param-unknown-key-error

Conversation

@Dreamstick9

Copy link
Copy Markdown
Contributor

Description:
This PR fixes a typo in awscli/argprocess.py where a NameError was raised during shorthand parsing errors because valid_key was used instead of valid_keys.

Fixes #10405

Testing Done:

  • Verified locally via Python REPL that instantiating ParamUnknownKeyError now successfully formats the error string instead of crashing with a NameError.
  • Ran local unit tests to ensure no regressions.

This commit fixes a typo in awscli/argprocess.py where valid_key was
used instead of valid_keys, causing a NameError instead of displaying
the intended shorthand parsing error.

Fixes aws#10405
@Dreamstick9 Dreamstick9 requested a review from a team as a code owner June 13, 2026 08:51
@codecov-commenter

codecov-commenter commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.61%. Comparing base (70d3b38) to head (f99b6bb).
⚠️ Report is 42 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #10406      +/-   ##
===========================================
+ Coverage    93.42%   93.61%   +0.18%     
===========================================
  Files          211      211              
  Lines        17312    17358      +46     
===========================================
+ Hits         16174    16249      +75     
+ Misses        1138     1109      -29     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ashovlin ashovlin merged commit 38075c4 into aws:develop Jun 19, 2026
41 checks passed
@ashovlin

Copy link
Copy Markdown
Member

Thanks for the contribution! It should go out in the next release. The v2 branch already has this fix.

aws-sdk-python-automation added a commit that referenced this pull request Jun 19, 2026
* release-1.45.34:
  Bumping version to 1.45.34
  Update changelog based on model updates
  Fix NameError in ParamUnknownKeyError formatting (#10406)
  docs(ec2): Add examples for modify-ipam-pool-allocation and describe-ipam-pool-allocations (#10396)
@ashovlin

Copy link
Copy Markdown
Member

This shipped in 1.45.34 today, thanks again @Dreamstick9

@Dreamstick9

Copy link
Copy Markdown
Contributor Author

Happy to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NameError in ParamUnknownKeyError due to undefined variable valid_key

3 participants