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.
is_disjoint_from
@final
1 parent fdbb426 commit 2f4a925Copy full SHA for 2f4a925
crates/ty_python_semantic/src/types/class.rs
@@ -627,14 +627,6 @@ impl<'db> ClassType<'db> {
627
return true;
628
}
629
630
- // Optimisation: if either class is `@final`, we only need to do one `is_subclass_of` call.
631
- if self.is_final(db) {
632
- return self.is_subclass_of(db, other);
633
- }
634
- if other.is_final(db) {
635
- return other.is_subclass_of(db, self);
636
637
-
638
// Two disjoint bases can only coexist in an MRO if one is a subclass of the other.
639
if self
640
.nearest_disjoint_base(db)
0 commit comments