Add missing constructor to types.CodeType. (#3040)

I got the argument order from
https://github.com/python/cpython/blob/2bfc2dc214445550521074f428245b502d215eac/Objects/codeobject.c#L263
and the types from the attributes already in the stub.
This commit is contained in:
Rebecca Chen
2019-06-08 07:07:29 -07:00
committed by Jelle Zijlstra
parent e7184d6dfc
commit d64a26cf99
+17
View File
@@ -64,6 +64,23 @@ class CodeType:
co_nlocals: int
co_stacksize: int
co_varnames: Tuple[str, ...]
def __init__(
self,
argcount: int,
nlocals: int,
stacksize: int,
flags: int,
codestring: str,
constants: Tuple[Any, ...],
names: Tuple[str, ...],
varnames: Tuple[str, ...],
filename: str,
name: str,
firstlineno: int,
lnotab: str,
freevars: Tuple[str, ...] = ...,
cellvars: Tuple[str, ...] = ...,
) -> None: ...
class GeneratorType:
gi_code: CodeType