| Conditions | 1 |
| Total Lines | 15 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | #!/usr/bin/env python3 |
||
| 13 | def parse_args(): |
||
| 14 | parser = argparse.ArgumentParser(prog='JSON Schema validator') |
||
| 15 | parser.add_argument("-s", |
||
| 16 | "--schema", |
||
| 17 | type=str, |
||
| 18 | default="./tests/json_schema_of_report.json", |
||
| 19 | help="Path to schema of JSON to validate." |
||
| 20 | ) |
||
| 21 | parser.add_argument('JSON', |
||
| 22 | type=argparse.FileType("r"), |
||
| 23 | nargs='?', |
||
| 24 | default=sys.stdin, |
||
| 25 | help="JSON file source. Default: stdin" |
||
| 26 | ) |
||
| 27 | return parser.parse_args() |
||
| 28 | |||
| 50 |