diff --git a/src/urls.rs b/src/urls.rs index 2db81433..82f92bd4 100644 --- a/src/urls.rs +++ b/src/urls.rs @@ -211,8 +211,9 @@ impl QueryParams { } } - pub fn __repr__(&self) -> String { - format!("QueryParams('{}')", self) + pub fn __repr__(slf: &Bound<'_, Self>) -> PyResult { + let class_name = slf.get_type().qualname()?; + Ok(format!("{}('{}')", class_name, slf)) } #[allow(unused_variables)]