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

Method process

src/click/parser.py:169–182  ·  view source on GitHub ↗
(self, value: t.Any, state: _ParsingState)

Source from the content-addressed store, hash-verified

167 return self.action in ("store", "append")
168
169 def process(self, value: t.Any, state: _ParsingState) -> None:
170 if self.action == "store":
171 state.opts[self.dest] = value # type: ignore
172 elif self.action == "store_const":
173 state.opts[self.dest] = self.const # type: ignore
174 elif self.action == "append":
175 state.opts.setdefault(self.dest, []).append(value) # type: ignore
176 elif self.action == "append_const":
177 state.opts.setdefault(self.dest, []).append(self.const) # type: ignore
178 elif self.action == "count":
179 state.opts[self.dest] = state.opts.get(self.dest, 0) + 1 # type: ignore
180 else:
181 raise ValueError(f"unknown action '{self.action}'")
182 state.order.append(self.obj)
183
184
185class _Argument:

Callers 3

_match_long_optMethod · 0.45
_match_short_optMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected