From 03e1efe2bde29f8bbc71c418f2ed6950e283097f Mon Sep 17 00:00:00 2001 From: David Peter Date: Thu, 20 Feb 2025 14:43:41 +0100 Subject: [PATCH] Add doc comment for try_call_dunder_get --- crates/red_knot_python_semantic/src/types.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/red_knot_python_semantic/src/types.rs b/crates/red_knot_python_semantic/src/types.rs index a69c97a0e8..eadff738e6 100644 --- a/crates/red_knot_python_semantic/src/types.rs +++ b/crates/red_knot_python_semantic/src/types.rs @@ -1528,7 +1528,11 @@ impl<'db> Type<'db> { } } - /// Call the `__get__(instance, owner)` method on a type, if it exists. + /// Call the `__get__(instance, owner)` method on a type, and get the return + /// type of the call. + /// + /// If `__get__` is not defined on the type, this method returns `Ok(None)`. + /// If the call to `__get__` fails, this method returns an error. fn try_call_dunder_get( &self, db: &'db dyn Db,