MCPcopy
hub / github.com/treeverse/dvc / parse_args

Function parse_args

dvc/cli/__init__.py:25–39  ·  view source on GitHub ↗

Parses CLI arguments. Args: argv: optional list of arguments to parse. sys.argv is used by default. Raises: DvcParserError: raised for argument parsing errors.

(argv=None)

Source from the content-addressed store, hash-verified

23
24
25def parse_args(argv=None):
26 """Parses CLI arguments.
27
28 Args:
29 argv: optional list of arguments to parse. sys.argv is used by default.
30
31 Raises:
32 DvcParserError: raised for argument parsing errors.
33 """
34 from .parser import get_main_parser
35
36 parser = get_main_parser()
37 args = parser.parse_args(argv)
38 args.parser = parser
39 return args
40
41
42def _log_unknown_exceptions() -> None:

Callers 15

test_argparseFunction · 0.90
test_pullFunction · 0.90
test_pushFunction · 0.90
test_statusFunction · 0.90
test_reproFunction · 0.90
test_removeFunction · 0.90
test_addFunction · 0.90
test_config_unsetFunction · 0.90
test_config_listFunction · 0.90
test_checkoutFunction · 0.90

Calls 2

get_main_parserFunction · 0.85
parse_argsMethod · 0.80

Tested by 15

test_argparseFunction · 0.72
test_pullFunction · 0.72
test_pushFunction · 0.72
test_statusFunction · 0.72
test_reproFunction · 0.72
test_removeFunction · 0.72
test_addFunction · 0.72
test_config_unsetFunction · 0.72
test_config_listFunction · 0.72
test_checkoutFunction · 0.72