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 8645330 commit 882e522Copy full SHA for 882e522
src/singledispatch/mro.rs
@@ -21,16 +21,13 @@ pub(crate) fn get_obj_mro(cls: &Bound<'_, PyAny>) -> PyResult<HashSet<PyTypeRefe
21
}
22
23
fn get_obj_bases(cls: &Bound<'_, PyAny>) -> PyResult<Vec<PyTypeReference>> {
24
- match cls.getattr_opt(intern!(cls.py(), "__bases__")) {
25
- Ok(opt) => match opt {
26
- Some(b) => Ok(b
27
- .downcast::<PyTuple>()?
28
- .iter()
29
- .map(|item| PyTypeReference::new(item.unbind()))
30
- .collect()),
31
- None => Ok(Vec::new()),
32
- },
33
- Err(e) => Err(e),
+ match cls.getattr_opt(intern!(cls.py(), "__bases__"))? {
+ Some(b) => Ok(b
+ .downcast::<PyTuple>()?
+ .iter()
+ .map(|item| PyTypeReference::new(item.unbind()))
+ .collect()),
+ None => Ok(Vec::new()),
34
35
36
0 commit comments