Skip to content

Commit a4cd9dc

Browse files
committed
fix mypy
1 parent 6222c5e commit a4cd9dc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bigframes/core/compile/polars/compiler.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ def compile_window(self, node: nodes.WindowOpNode):
360360
return df.with_columns([agg_expr])
361361

362362
else: # row-bounded window
363+
assert isinstance(window.bounds, window_spec.RowsWindowBounds)
363364
# Polars API semi-bounded, and any grouped rolling window challenging
364365
# https://github.com/pola-rs/polars/issues/4799
365366
# https://github.com/pola-rs/polars/issues/8976
@@ -383,9 +384,7 @@ def compile_window(self, node: nodes.WindowOpNode):
383384
return pl.concat([df, results], how="horizontal")
384385

385386

386-
def _get_period(
387-
bounds: Union[window_spec.RowsWindowBounds, window_spec.RangeWindowBounds]
388-
) -> Optional[int]:
387+
def _get_period(bounds: window_spec.RowsWindowBounds) -> Optional[int]:
389388
"""Returns None if the boundary is infinite."""
390389
if bounds.start is None or bounds.end is None:
391390
return None

0 commit comments

Comments
 (0)