From 42fa8434f0b2ccb1e0064cb6e03d4211008389d2 Mon Sep 17 00:00:00 2001 From: Pavel Karateev Date: Thu, 18 Nov 2021 22:36:41 +0300 Subject: [PATCH] Add codeobject.co_positions() for Python 3.11 (#6339) --- stdlib/types.pyi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdlib/types.pyi b/stdlib/types.pyi index ebf95db57..899024f2d 100644 --- a/stdlib/types.pyi +++ b/stdlib/types.pyi @@ -144,6 +144,8 @@ class CodeType: co_name: str = ..., co_lnotab: bytes = ..., ) -> CodeType: ... + if sys.version_info >= (3, 11): + def co_positions(self) -> Iterable[tuple[int | None, int | None, int | None, int | None]]: ... @final class MappingProxyType(Mapping[_KT, _VT_co], Generic[_KT, _VT_co]):