mirror of https://github.com/astral-sh/ruff
Update comment
This commit is contained in:
parent
0d9429cc64
commit
ece01a1cb6
|
|
@ -2710,10 +2710,10 @@ impl<'db> Type<'db> {
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|| ConstraintSet::from(relation.is_assignability())),
|
.unwrap_or_else(|| ConstraintSet::from(relation.is_assignability())),
|
||||||
|
|
||||||
// Similarly, `Literal[<class 'C'>]` is assignable to `C[...]` (a generic-alias type)
|
// Similarly, `<class 'C'>` is assignable to `<class 'C[...]'>` (a generic-alias type)
|
||||||
// if the default specialization of `C` is assignable to `C[...]`. This scenario
|
// if the default specialization of `C` is assignable to `C[...]`. This scenario occurs
|
||||||
// occurs with final generic types, where `type[C[...]]` is simplified to the
|
// with final generic types, where `type[C[...]]` is simplified to the generic-alias
|
||||||
// generic-alias type `C[...]`, due to the fact that `C[...]` has no subclasses.
|
// type `<class 'C[...]'>`, due to the fact that `C[...]` has no subclasses.
|
||||||
(Type::ClassLiteral(class), Type::GenericAlias(target_alias)) => {
|
(Type::ClassLiteral(class), Type::GenericAlias(target_alias)) => {
|
||||||
class.default_specialization(db).has_relation_to_impl(
|
class.default_specialization(db).has_relation_to_impl(
|
||||||
db,
|
db,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue