(arg: str | bytes)
| 70 | |
| 71 | |
| 72 | def _parse_json_object_arg(arg: str | bytes) -> dict[str, Any]: |
| 73 | if isinstance(arg, bytes): |
| 74 | arg = arg.decode("utf-8") |
| 75 | |
| 76 | value = json.loads(arg) |
| 77 | if not isinstance(value, dict): |
| 78 | raise ValueError(f"Invalid JSON object argument: {arg}") |
| 79 | return value |
| 80 | |
| 81 | |
| 82 | def add_args_from_model(parser: argparse.ArgumentParser, model: Type[BaseModel]): |
nothing calls this directly
no test coverage detected
searching dependent graphs…