(parser, checks=None, *, add_flags=None)
| 126 | |
| 127 | |
| 128 | def add_checks_cli(parser, checks=None, *, add_flags=None): |
| 129 | default = False |
| 130 | if not checks: |
| 131 | checks = list(CHECKS) |
| 132 | default = True |
| 133 | elif isinstance(checks, str): |
| 134 | checks = [checks] |
| 135 | if (add_flags is None and len(checks) > 1) or default: |
| 136 | add_flags = True |
| 137 | |
| 138 | process_checks = add_sepval_cli(parser, '--check', 'checks', checks) |
| 139 | if add_flags: |
| 140 | for check in checks: |
| 141 | parser.add_argument(f'--{check}', dest='checks', |
| 142 | action='append_const', const=check) |
| 143 | return [ |
| 144 | process_checks, |
| 145 | ] |
| 146 | |
| 147 | |
| 148 | def _get_check_handlers(fmt, printer, verbosity=VERBOSITY): |
no test coverage detected
searching dependent graphs…