We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7767ad5 commit 90b27a1Copy full SHA for 90b27a1
src/input/input_python.rs
@@ -434,7 +434,11 @@ impl<'py> Input<'py> for Bound<'py, PyAny> {
434
}
435
436
fn lax_dict<'a>(&'a self) -> ValResult<GenericPyMapping<'a, 'py>> {
437
- if let Ok(mapping) = self.downcast::<PyMapping>() {
+ if check_if_ordered_dict(self) {
438
+ Ok(GenericPyMapping::Mapping(self.downcast::<PyMapping>()?))
439
+ } else if let Ok(dict) = self.downcast::<PyDict>() {
440
+ Ok(GenericPyMapping::Dict(dict))
441
+ } else if let Ok(mapping) = self.downcast::<PyMapping>() {
442
Ok(GenericPyMapping::Mapping(mapping))
443
} else {
444
Err(ValError::new(ErrorTypeDefaults::DictType, self))
0 commit comments