From 2af8606d5cf1c4fb23cc4ed56579d667b2057bce Mon Sep 17 00:00:00 2001 From: Steven Karas Date: Tue, 3 Jul 2018 11:47:31 +0300 Subject: [PATCH] add __new__ to tuple in python2 this solves #2091 when checking python 2 code --- stdlib/2/__builtin__.pyi | 1 + stdlib/2/builtins.pyi | 1 + 2 files changed, 2 insertions(+) diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index ffb8f14b8fff..5a46deb80eda 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -515,6 +515,7 @@ class slice(object): def indices(self, len: int) -> Tuple[int, int, int]: ... class tuple(Sequence[_T_co], Generic[_T_co]): + def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ... def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ... def __len__(self) -> int: ... def __contains__(self, x: object) -> bool: ... diff --git a/stdlib/2/builtins.pyi b/stdlib/2/builtins.pyi index ffb8f14b8fff..5a46deb80eda 100644 --- a/stdlib/2/builtins.pyi +++ b/stdlib/2/builtins.pyi @@ -515,6 +515,7 @@ class slice(object): def indices(self, len: int) -> Tuple[int, int, int]: ... class tuple(Sequence[_T_co], Generic[_T_co]): + def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ... def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ... def __len__(self) -> int: ... def __contains__(self, x: object) -> bool: ...