Call the command with a list of arguments. At this point, all arguments are strings.
(self, args: Sequence[str])
| 141 | return bound_arguments |
| 142 | |
| 143 | def call(self, args: Sequence[str]) -> Any: |
| 144 | """ |
| 145 | Call the command with a list of arguments. At this point, all |
| 146 | arguments are strings. |
| 147 | """ |
| 148 | bound_args = self.prepare_args(args) |
| 149 | ret = self.func(*bound_args.args, **bound_args.kwargs) |
| 150 | if ret is None and self.return_type is None: |
| 151 | return |
| 152 | typ = mitmproxy.types.CommandTypes.get(self.return_type) |
| 153 | assert typ |
| 154 | if not typ.is_valid(self.manager, typ, ret): |
| 155 | raise exceptions.CommandError( |
| 156 | f"{self.name} returned unexpected data - expected {typ.display}" |
| 157 | ) |
| 158 | return ret |
| 159 | |
| 160 | |
| 161 | class ParseResult(NamedTuple): |