()
| 15 | |
| 16 | |
| 17 | def create_argparser(): |
| 18 | import argparse |
| 19 | |
| 20 | parser = argparse.ArgumentParser(description="Download CommonMark spec JSON") |
| 21 | parser.add_argument( |
| 22 | "version", |
| 23 | nargs="?", |
| 24 | default=default_version, |
| 25 | help=f"CommonMark spec version to download (default: {default_version})", |
| 26 | ) |
| 27 | parser.add_argument( |
| 28 | "--output-json", |
| 29 | type=Path, |
| 30 | default=default_json_path, |
| 31 | help=f"Output file path (default: {default_json_path})", |
| 32 | ) |
| 33 | parser.add_argument( |
| 34 | "--output-text", |
| 35 | type=Path, |
| 36 | default=default_text_path, |
| 37 | help=f"Output file path (default: {default_text_path})", |
| 38 | ) |
| 39 | parser.add_argument( |
| 40 | "--output-fixture", |
| 41 | type=Path, |
| 42 | default=default_fixture_path, |
| 43 | help=f"Write to test fixture (default: {default_fixture_path})", |
| 44 | ) |
| 45 | return parser |
| 46 | |
| 47 | |
| 48 | def _json_to_fixture(data: list[dict[str, Any]]) -> str: |
no outgoing calls
no test coverage detected
searching dependent graphs…