Skip to content

Commit 7f6187a

Browse files
committed
fix lint errors
1 parent afcc9f1 commit 7f6187a

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

python/datafusion/expr.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222

2323
from __future__ import annotations
2424

25-
from ._internal import (
26-
expr as expr_internal,
27-
LogicalPlan,
28-
functions as functions_internal,
29-
)
30-
from datafusion.common import NullTreatment, RexType, DataTypeMap
3125
from typing import Any, Optional, Type
32-
from typing_extensions import deprecated
26+
3327
import pyarrow as pa
28+
from datafusion.common import DataTypeMap, NullTreatment, RexType
29+
from typing_extensions import deprecated
30+
31+
from ._internal import LogicalPlan
32+
from ._internal import expr as expr_internal
33+
from ._internal import functions as functions_internal
3434

3535
# The following are imported from the internal representation. We may choose to
3636
# give these all proper wrappers, or to simply leave as is. These were added
@@ -196,7 +196,9 @@ def to_variant(self) -> Any:
196196
"""Convert this expression into a python object if possible."""
197197
return self.expr.to_variant()
198198

199-
@deprecated("display_name() is deprecated. Use :py:meth:`~Expr.schema_name` instead")
199+
@deprecated(
200+
"display_name() is deprecated. Use :py:meth:`~Expr.schema_name` instead"
201+
)
200202
def display_name(self) -> str:
201203
"""Returns the name of this expression as it should appear in a schema.
202204

python/datafusion/tests/test_expr.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,21 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
import pyarrow
19+
import pytest
1820
from datafusion import SessionContext, col
19-
from datafusion.expr import Column, Literal, BinaryExpr, AggregateFunction
2021
from datafusion.expr import (
21-
Projection,
22-
Filter,
2322
Aggregate,
23+
AggregateFunction,
24+
BinaryExpr,
25+
Column,
26+
Filter,
2427
Limit,
28+
Literal,
29+
Projection,
2530
Sort,
2631
TableScan,
2732
)
28-
import pyarrow
29-
import pytest
3033

3134

3235
@pytest.fixture
@@ -196,6 +199,7 @@ def test_expr_getitem() -> None:
196199

197200
def test_display_name_deprecation():
198201
import warnings
202+
199203
expr = col("foo")
200204
with warnings.catch_warnings(record=True) as w:
201205
# Cause all warnings to always be triggered

0 commit comments

Comments
 (0)