Commit 66be536
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 66be536
2 files changed
+26
-1
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 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
894 | 897 | | |
895 | 898 | | |
896 | 899 | | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
897 | 922 | | |
898 | 923 | | |
899 | 924 | | |
0 commit comments