Skip to content

Commit ddff4ee

Browse files
committed
Enabled ruff rule PLW2901
1 parent 5654587 commit ddff4ee

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

examples/python-udf-comparisons.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ def is_of_interest_impl(
112112
returnflag_arr: pa.Array,
113113
) -> pa.Array:
114114
result = []
115-
for idx, partkey in enumerate(partkey_arr):
116-
partkey = partkey.as_py()
115+
for idx, partkey_val in enumerate(partkey_arr):
116+
partkey = partkey_val.as_py()
117117
suppkey = suppkey_arr[idx].as_py()
118118
returnflag = returnflag_arr[idx].as_py()
119119
value = (partkey, suppkey, returnflag)

examples/tpch/convert_data_to_parquet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@
117117
]
118118

119119
curr_dir = os.path.dirname(os.path.abspath(__file__))
120-
for filename, curr_schema in all_schemas.items():
120+
for filename, curr_schema_val in all_schemas.items():
121121
# For convenience, go ahead and convert the schema column names to lowercase
122-
curr_schema = [(s[0].lower(), s[1]) for s in curr_schema]
122+
curr_schema = [(s[0].lower(), s[1]) for s in curr_schema_val]
123123

124124
# Pre-collect the output columns so we can ignore the null field we add
125125
# in to handle the trailing | in the file

examples/tpch/q19_discounted_revenue.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ def is_of_interest(
8989
same number of rows in the output.
9090
"""
9191
result = []
92-
for idx, brand in enumerate(brand_arr):
93-
brand = brand.as_py()
92+
for idx, brand_val in enumerate(brand_arr):
93+
brand = brand_val.as_py()
9494
if brand in items_of_interest:
9595
values_of_interest = items_of_interest[brand]
9696

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ ignore = [
9292
"N812",
9393
"INP001",
9494
"DTZ007",
95-
"PLW2901",
9695
"RET503",
9796
"RUF015",
9897
"A005",

0 commit comments

Comments
 (0)