@@ -563,8 +563,7 @@ def _validate_comparison_value(self, other):
563
563
raise InvalidComparison (other )
564
564
565
565
if isinstance (other , self ._recognized_scalars ) or other is NaT :
566
- # error: Too many arguments for "object"
567
- other = self ._scalar_type (other ) # type: ignore[call-arg]
566
+ other = self ._scalar_type (other )
568
567
try :
569
568
self ._check_compatible_with (other )
570
569
except (TypeError , IncompatibleFrequency ) as err :
@@ -614,16 +613,14 @@ def _validate_shift_value(self, fill_value):
614
613
if is_valid_na_for_dtype (fill_value , self .dtype ):
615
614
fill_value = NaT
616
615
elif isinstance (fill_value , self ._recognized_scalars ):
617
- # error: Too many arguments for "object"
618
- fill_value = self ._scalar_type (fill_value ) # type: ignore[call-arg]
616
+ fill_value = self ._scalar_type (fill_value )
619
617
else :
620
618
# only warn if we're not going to raise
621
619
if self ._scalar_type is Period and lib .is_integer (fill_value ):
622
620
# kludge for #31971 since Period(integer) tries to cast to str
623
621
new_fill = Period ._from_ordinal (fill_value , freq = self .freq )
624
622
else :
625
- # error: Too many arguments for "object"
626
- new_fill = self ._scalar_type (fill_value ) # type: ignore[call-arg]
623
+ new_fill = self ._scalar_type (fill_value )
627
624
628
625
# stacklevel here is chosen to be correct when called from
629
626
# DataFrame.shift or Series.shift
@@ -684,8 +681,7 @@ def _validate_scalar(
684
681
raise TypeError (msg )
685
682
686
683
elif isinstance (value , self ._recognized_scalars ):
687
- # error: Too many arguments for "object"
688
- value = self ._scalar_type (value ) # type: ignore[call-arg]
684
+ value = self ._scalar_type (value )
689
685
690
686
else :
691
687
msg = self ._validation_error_message (value , allow_listlike )
0 commit comments