(self, value: t.Any, state: _ParsingState)
| 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 | |
| 185 | class _Argument: |
no outgoing calls
no test coverage detected