We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9a30b2 commit 2e2a548Copy full SHA for 2e2a548
src/object/value/mod.rs
@@ -114,7 +114,8 @@ pub fn py_any_to_teo_value(py: Python<'_>, object: &PyAny) -> PyResult<Value> {
114
let mut map: IndexMap<String, Value> = IndexMap::new();
115
for k in dict.keys() {
116
let k_str: &str = k.extract()?;
117
- map.insert(k_str.to_owned(), py_any_to_teo_value(py, dict.get_item(k)?.unwrap())?);
+ let fixed_key = if k_str.ends_with("_") { k_str.strip_suffix("_").unwrap().to_owned() } else { k_str.to_owned() };
118
+ map.insert(fixed_key, py_any_to_teo_value(py, dict.get_item(k)?.unwrap())?);
119
}
120
Ok(Value::Dictionary(map))
121
} else if object.is_instance_of::<Range>() {
0 commit comments