(v)
| 249 | |
| 250 | |
| 251 | def str2bool(v): |
| 252 | if isinstance(v, bool): |
| 253 | return v |
| 254 | if v.lower() in ('yes', 'true', 't', 'y', '1'): |
| 255 | return True |
| 256 | elif v.lower() in ('no', 'false', 'f', 'n', '0'): |
| 257 | return False |
| 258 | else: |
| 259 | raise argparse.ArgumentTypeError('Boolean value expected.') |
| 260 | |
| 261 | |
| 262 | if __name__ == "__main__": |
nothing calls this directly
no outgoing calls
no test coverage detected