(self, action, value)
| 2284 | return result |
| 2285 | |
| 2286 | def _check_value(self, action, value): |
| 2287 | # converted value must be one of the choices (if specified) |
| 2288 | if action.choices is not None and value not in action.choices: |
| 2289 | tup = value, ', '.join(map(repr, action.choices)) |
| 2290 | msg = _('invalid choice: %r (choose from %s)') % tup |
| 2291 | raise ArgumentError(action, msg) |
| 2292 | |
| 2293 | # ======================= |
| 2294 | # Help-formatting methods |
no test coverage detected