From e560ce0f57f23a82fd8183c762d1e3f23d4e4343 Mon Sep 17 00:00:00 2001 From: Shantanu Date: Sun, 24 May 2020 17:53:03 -0700 Subject: [PATCH] bisect: hi is Optional (#4063) Shows up in 3.9 because of https://github.com/python/cpython/pull/20163 Co-authored-by: hauntsaninja <> --- stdlib/2and3/_bisect.pyi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stdlib/2and3/_bisect.pyi b/stdlib/2and3/_bisect.pyi index 4237e0508..43ee44bba 100644 --- a/stdlib/2and3/_bisect.pyi +++ b/stdlib/2and3/_bisect.pyi @@ -1,9 +1,9 @@ """Stub file for the '_bisect' module.""" -from typing import Sequence, MutableSequence, TypeVar +from typing import Optional, Sequence, MutableSequence, TypeVar _T = TypeVar('_T') -def bisect_left(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... -def bisect_right(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ... -def insort_left(a: MutableSequence[_T], x: _T, lo: int = ..., hi: int = ...) -> None: ... -def insort_right(a: MutableSequence[_T], x: _T, lo: int = ..., hi: int = ...) -> None: ... +def bisect_left(a: Sequence[_T], x: _T, lo: int = ..., hi: Optional[int] = ...) -> int: ... +def bisect_right(a: Sequence[_T], x: _T, lo: int = ..., hi: Optional[int] = ...) -> int: ... +def insort_left(a: MutableSequence[_T], x: _T, lo: int = ..., hi: Optional[int] = ...) -> None: ... +def insort_right(a: MutableSequence[_T], x: _T, lo: int = ..., hi: Optional[int] = ...) -> None: ...