Commit 16ebf4b
committed
Fix argparse error for BooleanArgument with % in documentation
Python 3.14+ argparse treats % characters in help strings as format
specifiers. When service model documentation contains % (e.g., IAM's
UpdateAccountPasswordPolicy RequireSymbols parameter), argparse raises:
ValueError: unsupported format character '^' (0x5e) at index 129
This was already fixed for CLIArgument in PR aws#9790 but BooleanArgument
was missed. This commit adds the same .replace('%', '%%') escaping to
BooleanArgument.add_to_parser() and adds a test to verify all service
operations with % in documentation work correctly.
Fixes compatibility with Python 3.14+1 parent ff104c9 commit 16ebf4b
2 files changed
+440
-308
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
| 596 | + | |
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
| |||
0 commit comments