(registry: Option<&ToolRegistry>)
| 30 | #[new] |
| 31 | #[pyo3(signature = (registry=None))] |
| 32 | pub fn new(registry: Option<&ToolRegistry>) -> Self { |
| 33 | let reg = if let Some(_r) = registry { |
| 34 | // Clone the provided registry (this is a simplified approach) |
| 35 | Arc::new(Mutex::new(ToolRegistry::new())) |
| 36 | } else { |
| 37 | get_global_registry() |
| 38 | }; |
| 39 | |
| 40 | Self { registry: reg } |
| 41 | } |
| 42 | |
| 43 | /// Decorator function to convert a Python function to a tool |
| 44 | #[pyo3(signature = (description=None, name=None, return_type=None))] |
nothing calls this directly
no test coverage detected