MCPcopy
hub / github.com/django/django / parse_args

Method parse_args

django/core/management/base.py:68–74  ·  view source on GitHub ↗
(self, args=None, namespace=None)

Source from the content-addressed store, hash-verified

66 super().__init__(**kwargs)
67
68 def parse_args(self, args=None, namespace=None):
69 # Catch missing argument for a better error message
70 if self.missing_args_message and not (
71 args or any(not arg.startswith("-") for arg in args)
72 ):
73 self.error(self.missing_args_message)
74 return super().parse_args(args, namespace)
75
76 def error(self, message):
77 if self.called_from_command_line:

Callers 12

run_from_argvMethod · 0.80
call_commandFunction · 0.80
mainFunction · 0.80
runtests.pyFile · 0.80
test_parallel_defaultMethod · 0.80
test_parallel_flagMethod · 0.80
test_parallel_autoMethod · 0.80
test_parallel_countMethod · 0.80
test_parallel_invalidMethod · 0.80

Calls 1

errorMethod · 0.95

Tested by 7

test_parallel_defaultMethod · 0.64
test_parallel_flagMethod · 0.64
test_parallel_autoMethod · 0.64
test_parallel_countMethod · 0.64
test_parallel_invalidMethod · 0.64