Skip to content

Commit 2f4a925

Browse files
committed
fix is_disjoint_from with @final classes
1 parent fdbb426 commit 2f4a925

File tree

1 file changed

+0
-8
lines changed
  • crates/ty_python_semantic/src/types

1 file changed

+0
-8
lines changed

crates/ty_python_semantic/src/types/class.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -627,14 +627,6 @@ impl<'db> ClassType<'db> {
627627
return true;
628628
}
629629

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-
638630
// Two disjoint bases can only coexist in an MRO if one is a subclass of the other.
639631
if self
640632
.nearest_disjoint_base(db)

0 commit comments

Comments
 (0)