Skip to content

Commit e7c6fc1

Browse files
authored
chore: cleanup type errors in tests/system/small/operations/test_datetimes.py (#769)
1 parent e627896 commit e7c6fc1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

bigframes/series.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -783,10 +783,10 @@ def pow(self, other: float | int | Series) -> Series:
783783
def rpow(self, other: float | int | Series) -> Series:
784784
return self._apply_binary_op(other, ops.pow_op, reverse=True)
785785

786-
def __lt__(self, other: float | int | Series) -> Series: # type: ignore
786+
def __lt__(self, other: float | int | str | Series) -> Series:
787787
return self.lt(other)
788788

789-
def __le__(self, other: float | int | Series) -> Series: # type: ignore
789+
def __le__(self, other: float | int | str | Series) -> Series:
790790
return self.le(other)
791791

792792
def lt(self, other) -> Series:
@@ -795,10 +795,10 @@ def lt(self, other) -> Series:
795795
def le(self, other) -> Series:
796796
return self._apply_binary_op(other, ops.le_op)
797797

798-
def __gt__(self, other: float | int | Series) -> Series: # type: ignore
798+
def __gt__(self, other: float | int | str | Series) -> Series:
799799
return self.gt(other)
800800

801-
def __ge__(self, other: float | int | Series) -> Series: # type: ignore
801+
def __ge__(self, other: float | int | str | Series) -> Series:
802802
return self.ge(other)
803803

804804
def gt(self, other) -> Series:

tests/system/small/operations/test_datetimes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,8 @@ def test_dt_floor(scalars_dfs, col_name, freq):
310310
def test_dt_compare_coerce_str_datetime(scalars_dfs):
311311
scalars_df, scalars_pandas_df = scalars_dfs
312312
bf_series: bigframes.series.Series = scalars_df["datetime_col"]
313-
# TODO(b/340878286): fix type error
314-
bf_result = (bf_series >= "2024-01-01").to_pandas() # type: ignore
315313

314+
bf_result = (bf_series >= "2024-01-01").to_pandas()
316315
pd_result = scalars_pandas_df["datetime_col"] >= pd.to_datetime("2024-01-01")
317316

318317
# pandas produces pyarrow bool dtype

0 commit comments

Comments
 (0)