From bb4f0220ce27231fe86426175f8f5f854b869c59 Mon Sep 17 00:00:00 2001 From: Brandt Bucher Date: Fri, 31 May 2019 11:53:41 -0700 Subject: [PATCH 1/2] Slice attributes can be of any type. --- stdlib/2and3/builtins.pyi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stdlib/2and3/builtins.pyi b/stdlib/2and3/builtins.pyi index 13a6ef968ecc..eb3001ca37ec 100644 --- a/stdlib/2and3/builtins.pyi +++ b/stdlib/2and3/builtins.pyi @@ -841,13 +841,13 @@ class bool(int): def __getnewargs__(self) -> Tuple[int]: ... class slice(object): - start: Optional[int] - step: Optional[int] - stop: Optional[int] + start: Any + step: Any + stop: Any @overload - def __init__(self, stop: Optional[int]) -> None: ... + def __init__(self, stop: Any) -> None: ... @overload - def __init__(self, start: Optional[int], stop: Optional[int], step: Optional[int] = ...) -> None: ... + def __init__(self, start: Any, stop: Any, step: Any = ...) -> None: ... def indices(self, len: int) -> Tuple[int, int, int]: ... class tuple(Sequence[_T_co], Generic[_T_co]): From 6aa7629950e207dde95fc4360dc82147814396bc Mon Sep 17 00:00:00 2001 From: Brandt Bucher Date: Fri, 31 May 2019 11:55:15 -0700 Subject: [PATCH 2/2] Sync builtin stubs. --- stdlib/2/__builtin__.pyi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index 13a6ef968ecc..eb3001ca37ec 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -841,13 +841,13 @@ class bool(int): def __getnewargs__(self) -> Tuple[int]: ... class slice(object): - start: Optional[int] - step: Optional[int] - stop: Optional[int] + start: Any + step: Any + stop: Any @overload - def __init__(self, stop: Optional[int]) -> None: ... + def __init__(self, stop: Any) -> None: ... @overload - def __init__(self, start: Optional[int], stop: Optional[int], step: Optional[int] = ...) -> None: ... + def __init__(self, start: Any, stop: Any, step: Any = ...) -> None: ... def indices(self, len: int) -> Tuple[int, int, int]: ... class tuple(Sequence[_T_co], Generic[_T_co]):