mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 13:30:49 -05:00
[ty] Bind self with instance in __get__ (#22155)
## Summary See: https://github.com/astral-sh/ruff/pull/22153/changes#r2641788438.
This commit is contained in:
@@ -193,8 +193,7 @@ class B:
|
||||
reveal_type(B().name_does_not_matter()) # revealed: B
|
||||
reveal_type(B().positional_only(1)) # revealed: B
|
||||
reveal_type(B().keyword_only(x=1)) # revealed: B
|
||||
# TODO: This should deally be `B`
|
||||
reveal_type(B().decorated_method()) # revealed: Self@decorated_method
|
||||
reveal_type(B().decorated_method()) # revealed: B
|
||||
|
||||
reveal_type(B().a_property) # revealed: B
|
||||
|
||||
|
||||
@@ -4702,7 +4702,7 @@ impl<'db> Type<'db> {
|
||||
Some((self, AttributeKind::NormalOrNonDataDescriptor))
|
||||
} else {
|
||||
Some((
|
||||
Type::Callable(callable.bind_self(db, None)),
|
||||
Type::Callable(callable.bind_self(db, Some(instance))),
|
||||
AttributeKind::NormalOrNonDataDescriptor,
|
||||
))
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user