(self, tool_name, config)
| 14 | self.tools[tool_name] = tool |
| 15 | |
| 16 | def build(self, tool_name, config) -> Tool: |
| 17 | ret = self.tools[tool_name]()(config) |
| 18 | if isinstance(ret, Tool): |
| 19 | return ret |
| 20 | raise ValueError("Tool builder {} did not return a Tool instance".format(tool_name)) |
| 21 | |
| 22 | def list_tools(self) -> List[str]: |
| 23 | return list(self.tools.keys()) |