We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
class.__call__
1 parent 73e884b commit 8d54996Copy full SHA for 8d54996
crates/red_knot_python_semantic/src/types.rs
@@ -616,8 +616,7 @@ impl<'db> Type<'db> {
616
Type::Instance(class) => {
617
// Since `__call__` is a dunder, we need to access it as an attribute on the class
618
// rather than the instance (matching runtime semantics).
619
- let meta_ty = Type::Class(class);
620
- let dunder_call_method = meta_ty.member(db, "__call__");
+ let dunder_call_method = class.class_member(db, "__call__");
621
if dunder_call_method.is_unbound() {
622
CallOutcome::not_callable(self)
623
} else {
0 commit comments