(boolean_pairs, parsed_args, **kwargs)
| 97 | |
| 98 | |
| 99 | def validate_boolean_mutex_groups(boolean_pairs, parsed_args, **kwargs): |
| 100 | # Validate we didn't pass in an --option and a --no-option. |
| 101 | for positive, negative in boolean_pairs: |
| 102 | if ( |
| 103 | getattr(parsed_args, positive.py_name) is not _NOT_SPECIFIED |
| 104 | and getattr(parsed_args, negative.py_name) is not _NOT_SPECIFIED |
| 105 | ): |
| 106 | raise ParamValidationError( |
| 107 | 'Cannot specify both the "%s" option and ' |
| 108 | 'the "%s" option.' % (positive.cli_name, negative.cli_name) |
| 109 | ) |
| 110 | |
| 111 | |
| 112 | class PositiveBooleanArgument(arguments.CLIArgument): |
nothing calls this directly
no test coverage detected