Skip to content

Commit d372db6

Browse files
committed
wip operator: modified Self import
1 parent a4de0bb commit d372db6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

narwhals/_sql/expr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ def round(self, decimals: int) -> Self:
500500
def sqrt(self) -> Self:
501501
def _sqrt(expr: NativeSQLExprT) -> NativeSQLExprT:
502502
return self._when(
503-
expr < self._lit(0),
503+
expr < self._lit(0), # type: ignore[operator]
504504
self._lit(float("nan")),
505505
self._function("sqrt", expr),
506506
)

narwhals/_sql/typing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any, TypeVar, Self
3+
from typing import TYPE_CHECKING, Any, 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
1010
from narwhals.dtypes import Boolean
11+
from typing_extensions import Self
1112

1213
# TODO: @mp, understand why these are here & if we need one for NativeSQLExprT
1314
SQLExprAny = SQLExpr[Any, Any]

0 commit comments

Comments
 (0)