From e2e712712ad3a07cee8e5eb438d3a3d95bcc6dd7 Mon Sep 17 00:00:00 2001 From: Richard Shadrach Date: Wed, 28 Jul 2021 21:38:26 -0400 Subject: [PATCH] TYP: Fix typing for searchsorted --- pandas/core/reshape/tile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/reshape/tile.py b/pandas/core/reshape/tile.py index c5d06bcef72a4..03dc124807f09 100644 --- a/pandas/core/reshape/tile.py +++ b/pandas/core/reshape/tile.py @@ -4,6 +4,7 @@ from typing import ( Any, Callable, + Literal, ) import numpy as np @@ -417,7 +418,7 @@ def _bins_to_cuts( else: bins = unique_bins - side = "left" if right else "right" + side: Literal["left", "right"] = "left" if right else "right" ids = ensure_platform_int(bins.searchsorted(x, side=side)) if include_lowest: