diff --git a/si-units/src/lib.rs b/si-units/src/lib.rs index 21f5bf2..288df15 100644 --- a/si-units/src/lib.rs +++ b/si-units/src/lib.rs @@ -326,9 +326,7 @@ struct SIArray1; #[pymethods] impl SIArray1 { - #[staticmethod] - #[expect(clippy::new_ret_no_self)] - fn new(value: Bound<'_, PyAny>) -> PyResult> { + fn __call__<'py>(&self, value: Bound<'py, PyAny>) -> PyResult> { let py = value.py(); if let Ok(v) = value.extract::() { let value = arr1(&[1.0]) * v.value; @@ -508,7 +506,7 @@ pub fn si_units(m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_class::()?; m.add_class::()?; - m.add_class::()?; + m.add("SIArray1", SIArray1)?; add_constant(m, "SECOND", 1.0, _SECOND)?; add_constant(m, "METER", 1.0, _METER)?;