@@ -5653,7 +5653,12 @@ def _validate_indexer(self, form: str_t, key, kind: str_t):
5653
5653
if key is not None and not is_integer (key ):
5654
5654
raise self ._invalid_indexer (form , key )
5655
5655
5656
- def _maybe_cast_slice_bound (self , label , side : str_t , kind : Literal ["loc" , "getitem" ] = no_default ):
5656
+ def _maybe_cast_slice_bound (
5657
+ self ,
5658
+ label ,
5659
+ side : str_t ,
5660
+ kind : Literal ["loc" , "getitem" ] = no_default
5661
+ ):
5657
5662
"""
5658
5663
This function should be overloaded in subclasses that allow non-trivial
5659
5664
casting on label-slice bounds, e.g. datetime-like indices allowing
@@ -5674,7 +5679,8 @@ def _maybe_cast_slice_bound(self, label, side: str_t, kind: Literal["loc", "geti
5674
5679
Value of `side` parameter should be validated in caller.
5675
5680
"""
5676
5681
if kind not in ["loc" , "getitem" , None , no_default ]:
5677
- raise ValueError ('Value for kind argument must be one of: loc, getitem or None' )
5682
+ raise ValueError ('Value for kind argument must be one of: '
5683
+ 'loc, getitem or None' )
5678
5684
self ._deprecated_arg (kind , "kind" , "_maybe_cast_slice_bound" )
5679
5685
5680
5686
# We are a plain index here (sub-class override this method if they
@@ -5719,7 +5725,8 @@ def get_slice_bound(self, label, side: str_t, kind=None) -> int:
5719
5725
Index of label.
5720
5726
"""
5721
5727
if kind not in ["loc" , "getitem" , None ]:
5722
- raise ValueError ('Value for kind argument must be one of: loc, getitem or None' )
5728
+ raise ValueError ('Value for kind argument must be one of: '
5729
+ 'loc, getitem or None' )
5723
5730
5724
5731
if side not in ("left" , "right" ):
5725
5732
raise ValueError (
0 commit comments