Skip to content

Commit d3af7d3

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ec08949 commit d3af7d3

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

narwhals/_sql/expr.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
combine_alias_output_names,
1616
combine_evaluate_output_names,
1717
)
18-
from narwhals._sql.typing import SQLLazyFrameT, NativeSQLExprT
18+
from narwhals._sql.typing import NativeSQLExprT, SQLLazyFrameT
1919
from narwhals._utils import Implementation, Version, not_implemented
2020

2121
if TYPE_CHECKING:
@@ -496,13 +496,12 @@ def round(self, decimals: int) -> Self:
496496
return self._with_elementwise(
497497
lambda expr: self._function("round", expr, self._lit(decimals))
498498
)
499-
# WIP: trying new NativeSQLExprT
499+
500+
# WIP: trying new NativeSQLExprT
500501
def sqrt(self) -> Self:
501502
def _sqrt(expr: NativeSQLExprT) -> NativeSQLExprT:
502503
return self._when(
503-
expr < self._lit(0),
504-
self._lit(float("nan")),
505-
self._function("sqrt", expr),
504+
expr < self._lit(0), self._lit(float("nan")), self._function("sqrt", expr)
506505
)
507506

508507
return self._with_elementwise(_sqrt)

narwhals/_sql/typing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any, TypeVar, Self
3+
from typing import TYPE_CHECKING, Any, Self, TypeVar
44

55
from narwhals._compliant.expr import NativeExpr
66

77
if TYPE_CHECKING:
88
from narwhals._sql.dataframe import SQLLazyFrame
99
from narwhals._sql.expr import SQLExpr
10-
from narwhals.dtypes import Boolean
1110

1211
# TODO: @mp, understand why these are here & if we need one for NativeSQLExprT
1312
SQLExprAny = SQLExpr[Any, Any]
@@ -18,8 +17,9 @@
1817
SQLLazyFrameT = TypeVar("SQLLazyFrameT", bound="SQLLazyFrameAny")
1918
NativeSQLExprT = TypeVar("NativeSQLExprT", bound="NativeSQLExpr")
2019

20+
2121
class NativeSQLExpr(NativeExpr):
22-
# both Self because we're comparing an expression with an expression?
22+
# both Self because we're comparing an expression with an expression?
2323
def __gt__(self, value: Self) -> Self: ...
2424

2525
def __lt__(self, value: Self) -> Self: ...

0 commit comments

Comments
 (0)