[ty] Fix CallableTypeOf[…] for classmethods (#20345)

## Summary

See https://github.com/astral-sh/ruff/pull/20338#discussion_r2337731998

## Test Plan

Regression test.
This commit is contained in:
David Peter
2025-09-11 10:14:38 +02:00
committed by GitHub
parent c6b92b918e
commit 59c8fda3f8
2 changed files with 7 additions and 1 deletions

View File

@@ -1166,7 +1166,7 @@ impl<'db> TypeInferenceBuilder<'db, '_> {
if let Some(bound_method) = argument_type.into_bound_method() {
binding
.signature
.bind_self(self.db(), Some(bound_method.self_instance(db)))
.bind_self(self.db(), Some(bound_method.typing_self_type(db)))
} else {
binding.signature.clone()
}