Skip to content

Commit e0b5ee9

Browse files
committed
fix format
1 parent b520602 commit e0b5ee9

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

bigframes/core/rewrite/timedeltas.py

-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ def _rewrite_sub_op(left: _TypedExpr, right: _TypedExpr) -> _TypedExpr:
110110
if dtypes.is_datetime_like(left.dtype) and dtypes.is_datetime_like(right.dtype):
111111
return _TypedExpr.create_op_expr(ops.timestamp_diff_op, left, right)
112112

113-
114113
if dtypes.is_datetime_like(left.dtype) and right.dtype is dtypes.TIMEDELTA_DTYPE:
115114
return _TypedExpr.create_op_expr(ops.timestamp_sub_op, left, right)
116115

tests/system/small/operations/test_timedeltas.py

+5-14
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,6 @@ def test_timestamp_sub__ts_series_minus_td_series(temporal_dfs, column, pd_dtype
196196
pandas.testing.assert_series_equal(
197197
actual_result, expected_result, check_index_type=False
198198
)
199-
200-
201-
202199

203200

204201
@pytest.mark.parametrize(
@@ -220,7 +217,6 @@ def test_timestamp_sub__ts_series_minus_td_literal(temporal_dfs, column, pd_dtyp
220217
)
221218

222219

223-
224220
def test_timestamp_sub__ts_literal_minus_td_series(temporal_dfs):
225221
bf_df, pd_df = temporal_dfs
226222
literal = pd.Timestamp("2025-01-01 01:00:00")
@@ -253,7 +249,6 @@ def test_timestamp_sub_with_numpy_op(temporal_dfs, column, pd_dtype):
253249
)
254250

255251

256-
257252
def test_timestamp_sub_dataframes(temporal_dfs):
258253
columns = ["datetime_col", "timestamp_col"]
259254
timedelta = pd.Timedelta(1, unit="s")
@@ -269,8 +264,8 @@ def test_timestamp_sub_dataframes(temporal_dfs):
269264
pandas.testing.assert_frame_equal(
270265
actual_result, expected_result, check_index_type=False
271266
)
272-
273-
267+
268+
274269
@pytest.mark.parametrize(
275270
"compare_func",
276271
[
@@ -296,8 +291,7 @@ def test_timedelta_series_comparison(temporal_dfs, compare_func):
296291
actual_result, expected_result, check_index_type=False
297292
)
298293

299-
300-
294+
301295
@pytest.mark.parametrize(
302296
"compare_func",
303297
[
@@ -319,9 +313,7 @@ def test_timedelta_series_and_literal_comparison(temporal_dfs, compare_func):
319313
pandas.testing.assert_series_equal(
320314
actual_result, expected_result, check_index_type=False
321315
)
322-
323-
324-
316+
325317

326318
def test_timedelta_filtering(session):
327319
pd_series = pd.Series(
@@ -341,11 +333,10 @@ def test_timedelta_filtering(session):
341333
)
342334

343335
expected_result = pd_series[(pd_series - timestamp) > pd.Timedelta(1, "h")]
344-
345336
pandas.testing.assert_series_equal(
346337
actual_result, expected_result, check_index_type=False
347338
)
348-
339+
349340

350341
def test_timedelta_ordering(session):
351342
pd_df = pd.DataFrame(

0 commit comments

Comments
 (0)