Skip to content

Commit 789531e

Browse files
committed
style: remove noqa comments for import statements
* Cleaned up import statements in multiple files by removing unnecessary noqa comments, enhancing code readability and maintaining consistency across the codebase.
1 parent 2b0c23d commit 789531e

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

python/datafusion/dataframe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def into_view(self, temporary: bool = False) -> Table:
330330
>>> df.collect() # The DataFrame is still usable
331331
>>> ctx.sql("SELECT value FROM values_view").collect()
332332
"""
333-
from datafusion.catalog import Table as _Table # noqa: PLC0415
333+
from datafusion.catalog import Table as _Table
334334

335335
return _Table(self.df.into_view(temporary))
336336

python/datafusion/expr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def sort_list_to_raw_sort_list(
342342
return raw_sort_list
343343

344344

345-
class Expr: # noqa: PLW1641
345+
class Expr:
346346
"""Expression object.
347347
348348
Expressions are one of the core concepts in DataFusion. See

python/datafusion/input/location.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def build_table(
4646
num_rows = 0 # Total number of rows in the file. Used for statistics
4747
columns = []
4848
if file_format == "parquet":
49-
import pyarrow.parquet as pq # noqa: PLC0415
49+
import pyarrow.parquet as pq
5050

5151
# Read the Parquet metadata
5252
metadata = pq.read_metadata(input_item)
@@ -61,7 +61,7 @@ def build_table(
6161
]
6262

6363
elif format == "csv":
64-
import csv # noqa: PLC0415
64+
import csv
6565

6666
# Consume header row and count number of rows for statistics.
6767
# TODO: Possibly makes sense to have the eager number of rows

python/datafusion/plan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
]
3333

3434

35-
class LogicalPlan: # noqa: PLW1641
35+
class LogicalPlan:
3636
"""Logical Plan.
3737
3838
A `LogicalPlan` is a node in a tree of relational operators (such as

python/tests/test_sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def test_register_parquet_partitioned(ctx, tmp_path, path_to_str, legacy_data_ty
188188
partition_data_type = "string" if legacy_data_type else pa.string()
189189

190190
if legacy_data_type:
191-
with pytest.warns(DeprecationWarning): # noqa: PT030
191+
with pytest.warns(DeprecationWarning):
192192
ctx.register_parquet(
193193
"datapp",
194194
dir_root,

0 commit comments

Comments
 (0)