Add TODO for builtins.tuple attribute lookups

This commit is contained in:
David Peter
2025-02-20 14:42:02 +01:00
parent 58cfe8036a
commit 89281f0556

View File

@@ -1511,7 +1511,12 @@ impl<'db> Type<'db> {
// where we infer `SliceLiteral` types.
Type::SliceLiteral(_) => KnownClass::Slice.to_instance(db).static_member(db, name),
Type::Tuple(_) => KnownClass::Tuple.to_instance(db).static_member(db, name),
Type::Tuple(_) => {
// TODO: We might want to special case some attributes here, as the stubs
// for `builtins.tuple` assume that `self` is a homogeneous tuple, while
// we're explicitly modeling heterogeneous tuples using `Type::Tuple`.
KnownClass::Tuple.to_instance(db).static_member(db, name)
}
Type::AlwaysTruthy | Type::AlwaysFalsy => match name {
"__bool__" => {