(
py: Python<'py>,
config: &Bound<'_, PyAny>,
)
| 756 | #[pyfunction(name = "initialize_plugins")] |
| 757 | #[pyo3(signature = (config: "object") -> "object", text_signature = "(config: object) -> object")] |
| 758 | fn initialize_plugins_py<'py>( |
| 759 | py: Python<'py>, |
| 760 | config: &Bound<'_, PyAny>, |
| 761 | ) -> PyResult<Bound<'py, PyAny>> { |
| 762 | let config_json = py_to_json(config)?; |
| 763 | let config: PluginConfig = serde_json::from_value(config_json) |
| 764 | .map_err(|e| pyo3::exceptions::PyValueError::new_err(e.to_string()))?; |
| 765 | pyo3_async_runtimes::tokio::future_into_py(py, async move { |
| 766 | let report = initialize_plugins(config).await.map_err(to_py_err)?; |
| 767 | Python::attach(|py| { |
| 768 | let report = serde_json::to_value(&report) |
| 769 | .map_err(|e| pyo3::exceptions::PyRuntimeError::new_err(e.to_string()))?; |
| 770 | json_to_py(py, &report) |
| 771 | }) |
| 772 | }) |
| 773 | } |
| 774 | |
| 775 | #[pyfunction(name = "clear_plugin_configuration")] |
| 776 | #[pyo3(signature = () -> "None", text_signature = "() -> None")] |
nothing calls this directly
no test coverage detected