(bases: &[PyRef<Self>])
| 559 | } |
| 560 | |
| 561 | fn resolve_mro(bases: &[PyRef<Self>]) -> Result<Vec<PyTypeRef>, String> { |
| 562 | // Check for duplicates in bases. |
| 563 | let mut unique_bases = HashSet::new(); |
| 564 | for base in bases { |
| 565 | if !unique_bases.insert(base.get_id()) { |
| 566 | return Err(format!("duplicate base class {}", base.name())); |
| 567 | } |
| 568 | } |
| 569 | |
| 570 | let mros = bases |
| 571 | .iter() |
| 572 | .map(|base| base.mro_map_collect(|t| t.to_owned())) |
| 573 | .collect(); |
| 574 | linearise_mro(mros) |
| 575 | } |
| 576 | |
| 577 | /// Inherit SEQUENCE and MAPPING flags from base classes |
| 578 | /// Check all bases in order and inherit the first SEQUENCE or MAPPING flag found |
nothing calls this directly
no test coverage detected