Skip to content

Commit d66a946

Browse files
committed
Applying ruff suggestions
1 parent 5306d1e commit d66a946

File tree

5 files changed

+5
-13
lines changed

5 files changed

+5
-13
lines changed

dev/release/generate-changelog.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ def print_pulls(repo_name, title, pulls):
3030
print()
3131
for pull, commit in pulls:
3232
url = f"https://github.com/{repo_name}/pull/{pull.number}"
33-
print(
34-
f"- {pull.title} [#{pull.number}]({url}) ({commit.author.login})"
35-
)
33+
print(f"- {pull.title} [#{pull.number}]({url}) ({commit.author.login})")
3634
print()
3735

3836

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ max-doc-length = 88
7777

7878
# Disable docstring checking for these directories
7979
[tool.ruff.lint.per-file-ignores]
80-
"python/tests/*" = ["D"]
80+
"python/tests/*" = ["ANN", "ARG", "D", "S101", "SLF", "PD"]
8181
"examples/*" = ["D", "W505"]
8282
"dev/*" = ["D"]
8383
"benchmarks/*" = ["D", "F"]

python/datafusion/context.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ class RuntimeConfig(RuntimeEnvBuilder):
394394
"""See `RuntimeEnvBuilder`."""
395395

396396

397-
398397
class SQLOptions:
399398
"""Options to be used when performing SQL queries."""
400399

python/datafusion/substrait.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ class plan(Plan):
7272
"""See `Plan`."""
7373

7474

75-
7675
class Serde:
7776
"""Provides the ``Substrait`` serialization and deserialization."""
7877

@@ -143,7 +142,6 @@ class serde(Serde):
143142
"""See `Serde` instead."""
144143

145144

146-
147145
class Producer:
148146
"""Generates substrait plans from a logical plan."""
149147

@@ -170,7 +168,6 @@ class producer(Producer):
170168
"""Use `Producer` instead."""
171169

172170

173-
174171
class Consumer:
175172
"""Generates a logical plan from a substrait plan."""
176173

@@ -193,4 +190,3 @@ def from_substrait_plan(ctx: SessionContext, plan: Plan) -> LogicalPlan:
193190
@deprecated("Use `Consumer` instead.")
194191
class consumer(Consumer):
195192
"""Use `Consumer` instead."""
196-

python/tests/test_wrapper_coverage.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import datafusion.functions
2020
import datafusion.object_store
2121
import datafusion.substrait
22+
import pytest
2223

2324
# EnumType introduced in 3.11. 3.10 and prior it was called EnumMeta.
2425
try:
@@ -41,10 +42,8 @@ def missing_exports(internal_obj, wrapped_obj) -> None:
4142
internal_attr = getattr(internal_obj, attr)
4243
wrapped_attr = getattr(wrapped_obj, attr)
4344

44-
if internal_attr is not None:
45-
if wrapped_attr is None:
46-
print("Missing attribute: ", attr)
47-
assert False
45+
if internal_attr is not None and wrapped_attr is None:
46+
pytest.fail(f"Missing attribute: {attr}")
4847

4948
if attr in ["__self__", "__class__"]:
5049
continue

0 commit comments

Comments
 (0)