@@ -127,7 +127,9 @@ class C: pass
127127 Expression , Context , ClassDef , SymbolTableNode , MypyFile , CallExpr
128128)
129129from mypy .tvar_scope import TypeVarLikeScope
130- from mypy .types import Type , Instance , CallableType , TypeList , UnboundType , ProperType
130+ from mypy .types import (
131+ Type , Instance , CallableType , TypeList , UnboundType , ProperType , FunctionLike
132+ )
131133from mypy .messages import MessageBuilder
132134from mypy .options import Options
133135from mypy .lookup import lookup_fully_qualified
@@ -544,7 +546,7 @@ def func(x: Other[int]) -> None:
544546 return None
545547
546548 def get_function_signature_hook (self , fullname : str
547- ) -> Optional [Callable [[FunctionSigContext ], CallableType ]]:
549+ ) -> Optional [Callable [[FunctionSigContext ], FunctionLike ]]:
548550 """Adjust the signature of a function.
549551
550552 This method is called before type checking a function call. Plugin
@@ -577,7 +579,7 @@ def get_function_hook(self, fullname: str
577579 return None
578580
579581 def get_method_signature_hook (self , fullname : str
580- ) -> Optional [Callable [[MethodSigContext ], CallableType ]]:
582+ ) -> Optional [Callable [[MethodSigContext ], FunctionLike ]]:
581583 """Adjust the signature of a method.
582584
583585 This method is called before type checking a method call. Plugin
@@ -748,15 +750,15 @@ def get_type_analyze_hook(self, fullname: str
748750 return self ._find_hook (lambda plugin : plugin .get_type_analyze_hook (fullname ))
749751
750752 def get_function_signature_hook (self , fullname : str
751- ) -> Optional [Callable [[FunctionSigContext ], CallableType ]]:
753+ ) -> Optional [Callable [[FunctionSigContext ], FunctionLike ]]:
752754 return self ._find_hook (lambda plugin : plugin .get_function_signature_hook (fullname ))
753755
754756 def get_function_hook (self , fullname : str
755757 ) -> Optional [Callable [[FunctionContext ], Type ]]:
756758 return self ._find_hook (lambda plugin : plugin .get_function_hook (fullname ))
757759
758760 def get_method_signature_hook (self , fullname : str
759- ) -> Optional [Callable [[MethodSigContext ], CallableType ]]:
761+ ) -> Optional [Callable [[MethodSigContext ], FunctionLike ]]:
760762 return self ._find_hook (lambda plugin : plugin .get_method_signature_hook (fullname ))
761763
762764 def get_method_hook (self , fullname : str
0 commit comments