diff --git a/mypy/plugin.py b/mypy/plugin.py index 383b07af87c0..a44ad57f6182 100644 --- a/mypy/plugin.py +++ b/mypy/plugin.py @@ -647,7 +647,7 @@ def get_method_signature_hook( may infer a better type for the method. The hook is also called for special Python dunder methods except __init__ and __new__ (use get_function_hook to customize class instantiation). This function is called with the method full name using - the class where it was _defined_. For example, in this code: + the class of the object on which the method is called. For example, in this code: from lib import Special @@ -663,7 +663,7 @@ class Derived(Base): x: Special y = x[0] - this method is called with '__main__.Base.method', and then with + this method is called with '__main__.Derived.method', and then with 'lib.Special.__getitem__'. """ return None @@ -672,7 +672,7 @@ def get_method_hook(self, fullname: str) -> Callable[[MethodContext], Type] | No """Adjust return type of a method call. This is the same as get_function_hook(), but is called with the - method full name (again, using the class where the method is defined). + method full name (using the class of the object on which the method is called). """ return None