@@ -534,9 +534,7 @@ def test_timedelta_add_sub() -> None:
534534 check (assert_type (td + as_timedelta_index , pd .TimedeltaIndex ), pd .TimedeltaIndex )
535535 check (assert_type (td + as_period_index , pd .PeriodIndex ), pd .PeriodIndex )
536536 check (assert_type (td + as_datetime_index , pd .DatetimeIndex ), pd .DatetimeIndex )
537- check (
538- assert_type (td + as_ndarray_td64 , np_ndarray_td ), np_ndarray_td , np .timedelta64
539- )
537+ check (assert_type (td + as_ndarray_td64 , np_ndarray_td ), np_ndarray , np .timedelta64 )
540538 check (assert_type (td + as_ndarray_dt64 , np_ndarray_dt ), np_ndarray , np .datetime64 )
541539 check (assert_type (td + as_nat , NaTType ), NaTType )
542540
@@ -586,9 +584,7 @@ def test_timedelta_add_sub() -> None:
586584 check (assert_type (td - as_dt_timedelta , pd .Timedelta ), pd .Timedelta )
587585 check (assert_type (td - as_timedelta64 , pd .Timedelta ), pd .Timedelta )
588586 check (assert_type (td - as_timedelta_index , pd .TimedeltaIndex ), pd .TimedeltaIndex )
589- check (
590- assert_type (td - as_ndarray_td64 , np_ndarray_td ), np_ndarray_td , np .timedelta64
591- )
587+ check (assert_type (td - as_ndarray_td64 , np_ndarray_td ), np_ndarray , np .timedelta64 )
592588 check (assert_type (td - as_nat , NaTType ), NaTType )
593589 check (assert_type (as_period - td , pd .Period ), pd .Period )
594590 check (assert_type (as_timestamp - td , pd .Timestamp ), pd .Timestamp )
@@ -1093,14 +1089,10 @@ def test_timestamp_add_sub() -> None:
10931089 )
10941090
10951091 check (
1096- assert_type (ts + as_np_ndarray_td64 , np_ndarray_dt ),
1097- np_ndarray_dt ,
1098- np .datetime64 ,
1092+ assert_type (ts + as_np_ndarray_td64 , np_ndarray_dt ), np_ndarray , np .datetime64
10991093 )
11001094 check (
1101- assert_type (as_np_ndarray_td64 + ts , np_ndarray_dt ),
1102- np_ndarray_dt ,
1103- np .datetime64 ,
1095+ assert_type (as_np_ndarray_td64 + ts , np_ndarray_dt ), np_ndarray , np .datetime64
11041096 )
11051097
11061098 # Reverse order is not possible for all of these
@@ -1114,9 +1106,7 @@ def test_timestamp_add_sub() -> None:
11141106 pd .Timestamp ,
11151107 )
11161108 check (
1117- assert_type (ts - as_np_ndarray_td64 , np_ndarray_dt ),
1118- np_ndarray_dt ,
1119- np .datetime64 ,
1109+ assert_type (ts - as_np_ndarray_td64 , np_ndarray_dt ), np_ndarray , np .datetime64
11201110 )
11211111
11221112
0 commit comments