Improve FunctionType.__get__ with @overload (#7005)

This commit is contained in:
Nikita Sobolev authored and GitHub committed 2022-01-23 12:38:09 -08:00
1 parent 64bb71d7c1
commit e6cf110100
1 file changed
+4 -1
+4 -1
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