(config: &Bound<'_, PyAny>)
| 38 | #[new] |
| 39 | #[pyo3(signature = (config: "object"), text_signature = "(config: object)")] |
| 40 | fn new(config: &Bound<'_, PyAny>) -> PyResult<Self> { |
| 41 | let config_json = py_to_json(config)?; |
| 42 | let config: AdaptiveConfig = serde_json::from_value(config_json) |
| 43 | .map_err(|e| pyo3::exceptions::PyValueError::new_err(e.to_string()))?; |
| 44 | let report = validate_adaptive_config_or_err(&config)?; |
| 45 | Ok(Self { |
| 46 | inner: Arc::new(tokio::sync::Mutex::new(Some( |
| 47 | PyAdaptiveRuntimeState::Pending { config, report }, |
| 48 | ))), |
| 49 | }) |
| 50 | } |
| 51 | |
| 52 | #[pyo3(signature = () -> "object", text_signature = "() -> object")] |
| 53 | fn register<'py>(&self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>> { |
nothing calls this directly
no test coverage detected