add types.FunctionType.__init__ (#2968)

Fixes #2930
This commit is contained in:
Jelle Zijlstra
2019-05-07 11:31:01 -04:00
committed by Sebastian Rittau
parent d7e9af4492
commit b5493e8639
2 changed files with 2 additions and 0 deletions

View File

@@ -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: ...

View File

@@ -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