Skip to content

Commit c774360

Browse files
committed
Enabled ruff rule PLR1714
1 parent 5034450 commit c774360

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ ignore = [
8585
# "B008",
8686
# "EM101",
8787
"PLR0913",
88-
"PLR1714",
88+
# "PLR1714",
8989
"ANN201",
9090
"C400",
9191
"TRY003",

python/datafusion/expr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,11 +692,11 @@ def __init__(
692692
"""
693693
if not isinstance(start_bound, pa.Scalar) and start_bound is not None:
694694
start_bound = pa.scalar(start_bound)
695-
if units == "rows" or units == "groups":
695+
if units in ("rows", "groups"):
696696
start_bound = start_bound.cast(pa.uint64())
697697
if not isinstance(end_bound, pa.Scalar) and end_bound is not None:
698698
end_bound = pa.scalar(end_bound)
699-
if units == "rows" or units == "groups":
699+
if units in ("rows", "groups"):
700700
end_bound = end_bound.cast(pa.uint64())
701701
self.window_frame = expr_internal.WindowFrame(units, start_bound, end_bound)
702702

0 commit comments

Comments
 (0)