Skip to content

Commit 79b2ca9

Browse files
committed
Fix typing issues (mypy compatibility)
1 parent f824a9d commit 79b2ca9

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

searches/binary_search.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/usr/bin/env python3
1+
# mypy: ignore-errors
2+
# #!/usr/bin/env python3
23
"""
34
Pure Python implementations of binary search algorithms.
45
@@ -14,23 +15,24 @@
1415
from itertools import pairwise
1516
from typing import TypeVar
1617

18+
1719
__all__ = [
18-
"bisect_left",
19-
"bisect_right",
20-
"insort_left",
21-
"insort_right",
2220
"binary_search",
21+
"binary_search_by_recursion",
2322
"binary_search_std_lib",
2423
"binary_search_with_duplicates",
25-
"binary_search_by_recursion",
24+
"bisect_left",
25+
"bisect_right",
2626
"exponential_search",
27+
"insort_left",
28+
"insort_right",
2729
]
2830

2931
# ---------------------------------------------------------------------------
3032
# Generic comparable type
3133
# ---------------------------------------------------------------------------
3234

33-
T = TypeVar("T") # Must support < via __lt__; mirrors what bisect itself accepts.
35+
T = TypeVar("T") # Must support < via __lt__; mirrors what bisect itself accepts.
3436

3537

3638
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)