Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions mypy/plugins/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
TPDICT_FB_NAMES,
AnyType,
CallableType,
FunctionLike,
Instance,
LiteralType,
NoneType,
Expand Down Expand Up @@ -111,7 +110,7 @@ def get_function_hook(self, fullname: str) -> Callable[[FunctionContext], Type]

def get_function_signature_hook(
self, fullname: str
) -> Callable[[FunctionSigContext], FunctionLike] | None:
) -> Callable[[FunctionSigContext], CallableType] | None:
if fullname in ("attr.evolve", "attrs.evolve", "attr.assoc", "attrs.assoc"):
return evolve_function_sig_callback
elif fullname in ("attr.fields", "attrs.fields"):
Expand All @@ -122,7 +121,7 @@ def get_function_signature_hook(

def get_method_signature_hook(
self, fullname: str
) -> Callable[[MethodSigContext], FunctionLike] | None:
) -> Callable[[MethodSigContext], CallableType] | None:
if fullname == "typing.Mapping.get":
return typed_dict_get_signature_callback
elif fullname in TD_SETDEFAULT_NAMES:
Expand Down
3 changes: 1 addition & 2 deletions mypy/plugins/singledispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from mypy.types import (
AnyType,
CallableType,
FunctionLike,
Instance,
NoneType,
Overloaded,
Expand Down Expand Up @@ -203,7 +202,7 @@ def call_singledispatch_function_after_register_argument(ctx: MethodContext) ->
return ctx.default_return_type


def call_singledispatch_function_callback(ctx: MethodSigContext) -> FunctionLike:
def call_singledispatch_function_callback(ctx: MethodSigContext) -> CallableType:
"""Called for functools._SingleDispatchCallable.__call__"""
if not isinstance(ctx.type, Instance):
return ctx.default_signature
Expand Down
Loading