From b5493e8639628de72b35ceddb24210dea63038a3 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 7 May 2019 11:31:01 -0400 Subject: [PATCH] add types.FunctionType.__init__ (#2968) Fixes #2930 --- stdlib/2/types.pyi | 1 + stdlib/3/types.pyi | 1 + 2 files changed, 2 insertions(+) diff --git a/stdlib/2/types.pyi b/stdlib/2/types.pyi index 72d3d8ec4..5984706ae 100644 --- a/stdlib/2/types.pyi +++ b/stdlib/2/types.pyi @@ -43,6 +43,7 @@ class FunctionType: __dict__ = func_dict __globals__ = func_globals __name__ = func_name + def __init__(self, code: CodeType, globals: Dict[str, Any], name: Optional[str] = ..., argdefs: Optional[Tuple[object, ...]] = ..., closure: Optional[Tuple[_Cell, ...]] = ...) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> Any: ... def __get__(self, obj: Optional[object], type: Optional[type]) -> UnboundMethodType: ... diff --git a/stdlib/3/types.pyi b/stdlib/3/types.pyi index 73e28a5e9..11ee6004a 100644 --- a/stdlib/3/types.pyi +++ b/stdlib/3/types.pyi @@ -32,6 +32,7 @@ class FunctionType: __qualname__: str __annotations__: Dict[str, Any] __kwdefaults__: Dict[str, Any] + def __init__(self, code: CodeType, globals: Dict[str, Any], name: Optional[str] = ..., argdefs: Optional[Tuple[object, ...]] = ..., closure: Optional[Tuple[_Cell, ...]] = ...) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> Any: ... def __get__(self, obj: Optional[object], type: Optional[type]) -> MethodType: ... LambdaType = FunctionType