Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mypy/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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

Expand Down
Loading