Skip to content

Commit b3c33a1

Browse files
committed
Enabled ruff rule SIM108
1 parent 5642b38 commit b3c33a1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

examples/python-udf-comparisons.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ def udf_using_pyarrow_compute_impl(
163163
resultant_arr = pc.and_(resultant_arr, filtered_returnflag_arr)
164164

165165
if results is None:
166-
results = resultant_arr
167-
else:
168-
results = pc.or_(results, resultant_arr)
166+
results = (
167+
resultant_arr if results is None else pc.or_(results, resultant_arr)
168+
)
169169

170170
return results
171171

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ ignore = [
101101
"PD901",
102102
# "EM102",
103103
"ERA001",
104-
"SIM108",
104+
# "SIM108",
105105
"ICN001",
106106
"ANN001",
107107
"ANN202",

python/datafusion/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ def register_csv(
844844
file_compression_type: File compression type.
845845
"""
846846
if isinstance(path, list):
847-
path = [str(p) for p in path]
847+
path = [str(p) for p in path] if isinstance(path, list) else str(path)
848848
else:
849849
path = str(path)
850850

0 commit comments

Comments
 (0)