@@ -388,7 +388,7 @@ def __hash__(self) -> int:
388
388
# We *do* want to include the real self.ordered here
389
389
return int (self ._hash_categories )
390
390
391
- def __eq__ (self , other : Any ) -> bool :
391
+ def __eq__ (self , other : object ) -> bool :
392
392
"""
393
393
Rules for CDT equality:
394
394
1) Any CDT is equal to the string 'category'
@@ -860,7 +860,7 @@ def __hash__(self) -> int:
860
860
# TODO: update this.
861
861
return hash (str (self ))
862
862
863
- def __eq__ (self , other : Any ) -> bool :
863
+ def __eq__ (self , other : object ) -> bool :
864
864
if isinstance (other , str ):
865
865
if other .startswith ("M8[" ):
866
866
other = f"datetime64[{ other [3 :]} "
@@ -1052,13 +1052,13 @@ def name(self) -> str_type:
1052
1052
def na_value (self ) -> NaTType :
1053
1053
return NaT
1054
1054
1055
- def __eq__ (self , other : Any ) -> bool :
1055
+ def __eq__ (self , other : object ) -> bool :
1056
1056
if isinstance (other , str ):
1057
1057
return other in [self .name , self .name .title ()]
1058
1058
1059
1059
return super ().__eq__ (other )
1060
1060
1061
- def __ne__ (self , other : Any ) -> bool :
1061
+ def __ne__ (self , other : object ) -> bool :
1062
1062
return not self .__eq__ (other )
1063
1063
1064
1064
@classmethod
@@ -1301,7 +1301,7 @@ def __hash__(self) -> int:
1301
1301
# make myself hashable
1302
1302
return hash (str (self ))
1303
1303
1304
- def __eq__ (self , other : Any ) -> bool :
1304
+ def __eq__ (self , other : object ) -> bool :
1305
1305
if isinstance (other , str ):
1306
1306
return other .lower () in (self .name .lower (), str (self ).lower ())
1307
1307
elif not isinstance (other , IntervalDtype ):
@@ -1647,7 +1647,7 @@ def __hash__(self) -> int:
1647
1647
# __eq__, so we explicitly do it here.
1648
1648
return super ().__hash__ ()
1649
1649
1650
- def __eq__ (self , other : Any ) -> bool :
1650
+ def __eq__ (self , other : object ) -> bool :
1651
1651
# We have to override __eq__ to handle NA values in _metadata.
1652
1652
# The base class does simple == checks, which fail for NA.
1653
1653
if isinstance (other , str ):
@@ -2062,7 +2062,7 @@ def __hash__(self) -> int:
2062
2062
# make myself hashable
2063
2063
return hash (str (self ))
2064
2064
2065
- def __eq__ (self , other : Any ) -> bool :
2065
+ def __eq__ (self , other : object ) -> bool :
2066
2066
if not isinstance (other , type (self )):
2067
2067
return super ().__eq__ (other )
2068
2068
return self .pyarrow_dtype == other .pyarrow_dtype
0 commit comments