Skip to content

Commit 5278258

Browse files
committed
fix types.FunctionType.__get__ signature
1 parent 971d2c3 commit 5278258

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stdlib/types.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class _Cell:
3939
__hash__: None # type: ignore[assignment]
4040
cell_contents: Any
4141

42+
# Make sure this class definition stays roughly in line with `builtins.function`
4243
@final
4344
class FunctionType:
4445
__closure__: tuple[_Cell, ...] | None
@@ -59,7 +60,7 @@ class FunctionType:
5960
closure: tuple[_Cell, ...] | None = ...,
6061
) -> None: ...
6162
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
62-
def __get__(self, obj: object | None, type: type | None) -> MethodType: ...
63+
def __get__(self, obj: object | None, type: type | None = ...) -> MethodType: ...
6364

6465
LambdaType = FunctionType
6566

0 commit comments

Comments
 (0)