Commit 8bf7594
authored
Argparse Python 3.14 enhancements (#1331)
The argparse lib in Py314 now can do suggestion of an
argument when a typo is given. It only works on choices,
but regardless it can be handy to users of Bandit. Besides
Python 3.15 plans to enable this by default.
The other change is the color being disabled. Color in CLIs
defaults to True in Python 3.14. And frankly it doesn't look
good. Way too many colors being used.
https://docs.python.org/3/library/argparse.html#suggest-on-error
Signed-off-by: Eric Brown <[email protected]>1 parent a255dfa commit 8bf7594
3 files changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| |||
0 commit comments