MCPcopy
hub / github.com/pallets/click / parse_args

Method parse_args

src/click/core.py:1922–1934  ·  view source on GitHub ↗
(self, ctx: Context, args: list[str])

Source from the content-addressed store, hash-verified

1920 formatter.write_dl(rows)
1921
1922 def parse_args(self, ctx: Context, args: list[str]) -> list[str]:
1923 if not args and self.no_args_is_help and not ctx.resilient_parsing:
1924 raise NoArgsIsHelpError(ctx)
1925
1926 rest = super().parse_args(ctx, args)
1927
1928 if self.chain:
1929 ctx._protected_args = rest
1930 ctx.args = []
1931 elif rest:
1932 ctx._protected_args, ctx.args = rest[:1], rest[1:]
1933
1934 return ctx.args
1935
1936 def invoke(self, ctx: Context) -> t.Any:
1937 def _process_result(value: t.Any) -> t.Any:

Callers 2

resolve_commandMethod · 0.95
parse_argsMethod · 0.45

Calls 1

NoArgsIsHelpErrorClass · 0.85

Tested by

no test coverage detected