mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Add CodeType.co_lines() and CodeType.co_linetable (#6445)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -123,7 +123,30 @@ class CodeType:
|
||||
freevars: Tuple[str, ...] = ...,
|
||||
cellvars: Tuple[str, ...] = ...,
|
||||
) -> None: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
if sys.version_info >= (3, 10):
|
||||
def replace(
|
||||
self,
|
||||
*,
|
||||
co_argcount: int = ...,
|
||||
co_posonlyargcount: int = ...,
|
||||
co_kwonlyargcount: int = ...,
|
||||
co_nlocals: int = ...,
|
||||
co_stacksize: int = ...,
|
||||
co_flags: int = ...,
|
||||
co_firstlineno: int = ...,
|
||||
co_code: bytes = ...,
|
||||
co_consts: Tuple[Any, ...] = ...,
|
||||
co_names: Tuple[str, ...] = ...,
|
||||
co_varnames: Tuple[str, ...] = ...,
|
||||
co_freevars: Tuple[str, ...] = ...,
|
||||
co_cellvars: Tuple[str, ...] = ...,
|
||||
co_filename: str = ...,
|
||||
co_name: str = ...,
|
||||
co_linetable: object = ...,
|
||||
) -> CodeType: ...
|
||||
def co_lines(self) -> Iterator[tuple[int, int, int | None]]: ...
|
||||
co_linetable: object
|
||||
elif sys.version_info >= (3, 8):
|
||||
def replace(
|
||||
self,
|
||||
*,
|
||||
|
||||
Reference in New Issue
Block a user