Skip to content

Commit

Permalink
[red-knot] Remove an unnecessary branch and a confusing TODO comment (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored Dec 11, 2024
1 parent 0c85023 commit ef153a0
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions crates/red_knot_python_semantic/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1660,12 +1660,6 @@ impl<'db> Type<'db> {
};
}

if matches!(self, Type::Unknown | Type::Any | Type::Todo(_)) {
// Explicit handling of `Unknown` and `Any` necessary until `type[Unknown]` and
// `type[Any]` are not defined as `Todo` anymore.
return IterationOutcome::Iterable { element_ty: self };
}

let dunder_iter_result = self.call_dunder(db, "__iter__", &[self]);
match dunder_iter_result {
CallDunderResult::CallOutcome(ref call_outcome)
Expand Down

0 comments on commit ef153a0

Please # to comment.