Skip to content

Commit 07bdd83

Browse files
committed
ser as complex number for Complex inference in Python
1 parent 1e5e899 commit 07bdd83

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/serializers/infer.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,7 @@ pub(crate) fn infer_to_python_known(
232232
}
233233
ObType::Complex => {
234234
let v = value.downcast::<PyComplex>()?;
235-
let complex_str = type_serializers::complex::complex_to_str(v);
236-
complex_str.into_py(py)
235+
v.into_py(py)
237236
}
238237
ObType::Path => value.str()?.into_py(py),
239238
ObType::Pattern => value.getattr(intern!(py, "pattern"))?.into_py(py),
@@ -285,8 +284,7 @@ pub(crate) fn infer_to_python_known(
285284
}
286285
ObType::Complex => {
287286
let v = value.downcast::<PyComplex>()?;
288-
let complex_str = type_serializers::complex::complex_to_str(v);
289-
complex_str.into_py(py)
287+
v.into_py(py)
290288
}
291289
ObType::Unknown => {
292290
if let Some(fallback) = extra.fallback {

0 commit comments

Comments
 (0)