@@ -232,7 +232,7 @@ class NDFrame(PandasObject, SelectionMixin, indexing.IndexingMixin):
232232 def __init__ (
233233 self ,
234234 data : Manager ,
235- copy : bool = False ,
235+ copy : bool_t = False ,
236236 attrs : Mapping [Hashable , Any ] | None = None ,
237237 ):
238238 # copy kwarg is retained for mypy compat, is not used
@@ -249,7 +249,7 @@ def __init__(
249249
250250 @classmethod
251251 def _init_mgr (
252- cls , mgr , axes , dtype : Dtype | None = None , copy : bool = False
252+ cls , mgr , axes , dtype : Dtype | None = None , copy : bool_t = False
253253 ) -> Manager :
254254 """ passed a manager and a axes dict """
255255 for a , axe in axes .items ():
@@ -377,8 +377,8 @@ def flags(self) -> Flags:
377377 def set_flags (
378378 self : FrameOrSeries ,
379379 * ,
380- copy : bool = False ,
381- allows_duplicate_labels : bool | None = None ,
380+ copy : bool_t = False ,
381+ allows_duplicate_labels : bool_t | None = None ,
382382 ) -> FrameOrSeries :
383383 """
384384 Return a new object with updated flags.
@@ -467,7 +467,7 @@ def _data(self):
467467 _stat_axis_name = "index"
468468 _AXIS_ORDERS : list [str ]
469469 _AXIS_TO_AXIS_NUMBER : dict [Axis , int ] = {0 : 0 , "index" : 0 , "rows" : 0 }
470- _AXIS_REVERSED : bool
470+ _AXIS_REVERSED : bool_t
471471 _info_axis_number : int
472472 _info_axis_name : str
473473 _AXIS_LEN : int
@@ -494,7 +494,7 @@ def _construct_axes_dict(self, axes=None, **kwargs):
494494 @final
495495 @classmethod
496496 def _construct_axes_from_arguments (
497- cls , args , kwargs , require_all : bool = False , sentinel = None
497+ cls , args , kwargs , require_all : bool_t = False , sentinel = None
498498 ):
499499 """
500500 Construct and returns axes if supplied in args/kwargs.
@@ -714,11 +714,11 @@ def set_axis(self: FrameOrSeries, labels, *, inplace: Literal[True]) -> None:
714714
715715 @overload
716716 def set_axis (
717- self : FrameOrSeries , labels , axis : Axis = ..., inplace : bool = ...
717+ self : FrameOrSeries , labels , axis : Axis = ..., inplace : bool_t = ...
718718 ) -> FrameOrSeries | None :
719719 ...
720720
721- def set_axis (self , labels , axis : Axis = 0 , inplace : bool = False ):
721+ def set_axis (self , labels , axis : Axis = 0 , inplace : bool_t = False ):
722722 """
723723 Assign desired index to given axis.
724724
@@ -749,7 +749,7 @@ def set_axis(self, labels, axis: Axis = 0, inplace: bool = False):
749749 return self ._set_axis_nocheck (labels , axis , inplace )
750750
751751 @final
752- def _set_axis_nocheck (self , labels , axis : Axis , inplace : bool ):
752+ def _set_axis_nocheck (self , labels , axis : Axis , inplace : bool_t ):
753753 # NDFrame.rename with inplace=False calls set_axis(inplace=True) on a copy.
754754 if inplace :
755755 setattr (self , self ._get_axis_name (axis ), labels )
@@ -993,8 +993,8 @@ def rename(
993993 index : Renamer | None = None ,
994994 columns : Renamer | None = None ,
995995 axis : Axis | None = None ,
996- copy : bool = True ,
997- inplace : bool = False ,
996+ copy : bool_t = True ,
997+ inplace : bool_t = False ,
998998 level : Level | None = None ,
999999 errors : str = "ignore" ,
10001000 ) -> FrameOrSeries | None :
@@ -1400,13 +1400,13 @@ def _set_axis_name(self, name, axis=0, inplace=False):
14001400 # Comparison Methods
14011401
14021402 @final
1403- def _indexed_same (self , other ) -> bool :
1403+ def _indexed_same (self , other ) -> bool_t :
14041404 return all (
14051405 self ._get_axis (a ).equals (other ._get_axis (a )) for a in self ._AXIS_ORDERS
14061406 )
14071407
14081408 @final
1409- def equals (self , other : object ) -> bool :
1409+ def equals (self , other : object ) -> bool_t :
14101410 """
14111411 Test whether two objects contain the same elements.
14121412
@@ -4992,15 +4992,15 @@ def filter(
49924992 return self .reindex (** {name : [r for r in items if r in labels ]})
49934993 elif like :
49944994
4995- def f (x ) -> bool :
4995+ def f (x ) -> bool_t :
49964996 assert like is not None # needed for mypy
49974997 return like in ensure_str (x )
49984998
49994999 values = labels .map (f )
50005000 return self .loc (axis = axis )[values ]
50015001 elif regex :
50025002
5003- def f (x ) -> bool :
5003+ def f (x ) -> bool_t :
50045004 return matcher .search (ensure_str (x )) is not None
50055005
50065006 matcher = re .compile (regex )
0 commit comments