Skip to content

Commit 308fc9e

Browse files
committed
Ruff C419: Unsafe-fixed all unneeded list comprehensions
1 parent cebb932 commit 308fc9e

File tree

6 files changed

+124
-124
lines changed

6 files changed

+124
-124
lines changed

duckdb/experimental/spark/sql/dataframe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ def join(
675675
"""
676676
if on is not None and not isinstance(on, list):
677677
on = [on] # type: ignore[assignment]
678-
if on is not None and not all([isinstance(x, str) for x in on]):
678+
if on is not None and not all(isinstance(x, str) for x in on):
679679
assert isinstance(on, list)
680680
# Get (or create) the Expressions from the list of Columns
681681
on = [_to_column_expr(x) for x in on]
@@ -691,7 +691,7 @@ def join(
691691
how = "inner"
692692
if on is None:
693693
on = "true"
694-
elif isinstance(on, list) and all([isinstance(x, str) for x in on]):
694+
elif isinstance(on, list) and all(isinstance(x, str) for x in on):
695695
# Passed directly through as a list of strings
696696
on = on
697697
else:

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def convert_to_numpy(df):
147147
if (
148148
pyarrow_dtypes_enabled
149149
and pyarrow_dtype is not None
150-
and any([True for x in df.dtypes if isinstance(x, pyarrow_dtype)])
150+
and any(True for x in df.dtypes if isinstance(x, pyarrow_dtype))
151151
):
152152
return convert_arrow_to_numpy_backend(df)
153153
return df

0 commit comments

Comments
 (0)