Skip to content

Commit 6659431

Browse files
committed
ref: use truth value
1 parent cce7a08 commit 6659431

File tree

1 file changed

+2
-2
lines changed
  • python/xorq/backends/let/datafusion

1 file changed

+2
-2
lines changed

python/xorq/backends/let/datafusion/udfs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ def regex_split(s: str, pattern: str) -> list[str]:
133133

134134

135135
def temporal_strftime(array: dt.Timestamp(scale=9), pattern: dt.string) -> dt.string:
136-
pattern, *_rest = typing.cast(pa.StringArray, pattern).unique().to_pylist()
136+
pattern, *rest = typing.cast(pa.StringArray, pattern).unique().to_pylist()
137137

138-
if len(_rest) > 0:
138+
if rest:
139139
raise com.XorqError(
140140
"Only a single scalar pattern is supported for DataFusion strftime"
141141
)

0 commit comments

Comments
 (0)