| Conditions | 3 |
| Total Lines | 15 |
| Code Lines | 14 |
| Lines | 15 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | """ |
||
| 13 | def parse_arguments(self, configuration_details): |
||
| 14 | parser = argparse.ArgumentParser() |
||
| 15 | for input_key, attributes in configuration_details.items(): |
||
| 16 | action_value = self.translate_default(attributes['default_value']) |
||
| 17 | if action_value is None: |
||
| 18 | parser.add_argument('-' + input_key, '--' + attributes['option_long'], |
||
| 19 | required=attributes['option_required'], |
||
| 20 | default=attributes['default_value'], |
||
| 21 | help=attributes['option_sample_value']) |
||
| 22 | else: |
||
| 23 | parser.add_argument('-' + input_key, '--' + attributes['option_long'], |
||
| 24 | required=attributes['option_required'], |
||
| 25 | default=attributes['default_value'], |
||
| 26 | action=action_value) |
||
| 27 | return parser.parse_args() |
||
| 28 | |||
| 37 |