Improve FunctionType.__get__ with @overload (#7005)

This commit is contained in:
Nikita Sobolev
2022-01-23 23:38:09 +03:00
committed by GitHub
parent 64bb71d7c1
commit e6cf110100

View File

@@ -58,7 +58,10 @@ class FunctionType:
closure: tuple[_Cell, ...] | None = ...,
) -> None: ...
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
def __get__(self, obj: object | None, type: type | None = ...) -> MethodType: ...
@overload
def __get__(self, obj: None, type: type) -> FunctionType: ...
@overload
def __get__(self, obj: object, type: type | None = ...) -> MethodType: ...
LambdaType = FunctionType