A value is considered missing if: - it is :attr:`UNSET`, - or if it is an empty sequence while the parameter is suppose to have non-single value (i.e. :attr:`nargs` is not ``1`` or :attr:`multiple` is set). :meta private:
(self, value: t.Any)
| 2516 | return convert(value) |
| 2517 | |
| 2518 | def value_is_missing(self, value: t.Any) -> bool: |
| 2519 | """A value is considered missing if: |
| 2520 | |
| 2521 | - it is :attr:`UNSET`, |
| 2522 | - or if it is an empty sequence while the parameter is suppose to have |
| 2523 | non-single value (i.e. :attr:`nargs` is not ``1`` or :attr:`multiple` is |
| 2524 | set). |
| 2525 | |
| 2526 | :meta private: |
| 2527 | """ |
| 2528 | if value is UNSET: |
| 2529 | return True |
| 2530 | |
| 2531 | if (self.nargs != 1 or self.multiple) and value == (): |
| 2532 | return True |
| 2533 | |
| 2534 | return False |
| 2535 | |
| 2536 | def process_value(self, ctx: Context, value: t.Any) -> t.Any: |
| 2537 | """Process the value of this parameter: |