MCPcopy Create free account
hub / github.com/executablebooks/markdown-it-py / create_argparser

Function create_argparser

tests/test_cmark_spec/get_cmark_spec.py:17–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16
17def 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
48def _json_to_fixture(data: list[dict[str, Any]]) -> str:

Callers 1

get_cmark_spec.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…