Skip to content

Commit c3dff93

Browse files
committed
Add check for dead code
1 parent 1fe33ea commit c3dff93

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

examples/tpch/q07_volume_shipping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
# not match these will result in a null value and then get filtered out.
8181
#
8282
# To do the same using a simple filter would be:
83-
# df_nation = df_nation.filter((F.col("n_name") == nation_1) | (F.col("n_name") == nation_2))
83+
# df_nation = df_nation.filter((F.col("n_name") == nation_1) | (F.col("n_name") == nation_2)) # noqa: ERA001
8484
df_nation = df_nation.with_column(
8585
"n_name",
8686
F.case(col("n_name"))

examples/tpch/q12_ship_mode_order_priority.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
# matches either of the two values, but we want to show doing some array operations in this
7474
# example. If you want to see this done with filters, comment out the above line and uncomment
7575
# this one.
76-
# df = df.filter((col("l_shipmode") == lit(SHIP_MODE_1)) | (col("l_shipmode") == lit(SHIP_MODE_2)))
76+
# df = df.filter((col("l_shipmode") == lit(SHIP_MODE_1)) | (col("l_shipmode") == lit(SHIP_MODE_2))) # noqa: ERA001
7777

7878

7979
# We need order priority, so join order df to line item

pyproject.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,8 @@ ignore = [
8787
"TD002", # Do not require author names in TODO statements
8888
"TD003", # Allow TODO lines
8989
"PLR0913", # Allow many arguments in function definition
90+
"PD901", # Allow variable name df
9091
# TODO: Enable all of the following, but this PR is getting too large already
91-
# "TRY003",
92-
"PD901",
93-
"ERA001",
9492
"ANN001",
9593
"ANN202",
9694
"PTH",
@@ -130,9 +128,10 @@ extend-allowed-calls = ["lit", "datafusion.lit"]
130128
"PT004",
131129
]
132130
"examples/*" = ["D", "W505", "E501", "T201", "S101", "PLR2004"]
133-
"dev/*" = ["D", "E", "T", "S", "PLR", "C", "SIM", "UP", "EXE", "N817"]
134-
"benchmarks/*" = ["D", "F", "T", "BLE", "FURB", "PLR", "E", "TD", "TRY", "S", "SIM", "EXE", "UP"]
131+
"dev/*" = ["D", "E", "T", "S", "PLR", "C", "SIM", "UP", "EXE", "N817", "ERA001"]
132+
"benchmarks/*" = ["D", "F", "T", "BLE", "FURB", "PLR", "E", "TD", "TRY", "S", "SIM", "EXE", "UP", "ERA001"]
135133
"docs/*" = ["D"]
134+
"docs/source/conf.py" = ["ERA001"]
136135

137136
[tool.codespell]
138137
skip = [

python/datafusion/dataframe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class Compression(Enum):
7878
LZ4 = "lz4"
7979
# lzo is not implemented yet
8080
# https://github.com/apache/arrow-rs/issues/6970
81-
# LZO = "lzo"
81+
# LZO = "lzo" # noqa: ERA001
8282
ZSTD = "zstd"
8383
LZ4_RAW = "lz4_raw"
8484

python/tests/test_aggregation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def df_aggregate_100():
8888
f.covar_samp(column("b"), column("c")),
8989
lambda a, b, c, d: np.array(np.cov(b, c, ddof=1)[0][1]),
9090
),
91-
# f.grouping(col_a), # No physical plan implemented yet
91+
# f.grouping(col_a), # noqa: ERA001 No physical plan implemented yet
9292
(f.max(column("a")), lambda a, b, c, d: np.array(np.max(a))),
9393
(f.mean(column("b")), lambda a, b, c, d: np.array(np.mean(b))),
9494
(f.median(column("b")), lambda a, b, c, d: np.array(np.median(b))),

0 commit comments

Comments
 (0)