Skip to content

Commit 266cab9

Browse files
committed
wip operator: fixed NativeSQLExprT bound
1 parent 9a544e8 commit 266cab9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

narwhals/_sql/expr.py

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

narwhals/_sql/typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ def __mul__(self, value: Self) -> Self: ...
4545
SQLExprT_contra = TypeVar("SQLExprT_contra", bound="SQLExprAny", contravariant=True)
4646
SQLLazyFrameT = TypeVar("SQLLazyFrameT", bound="SQLLazyFrameAny")
4747
# TODO: @mp, should this be contravariant as to do with function arguments? think through!
48-
NativeSQLExprT = TypeVar("NativeSQLExprT", bound="NativeSQLExpr")
48+
NativeSQLExprT = TypeVar("NativeSQLExprT", bound="NativeSQLExprAny")
4949

0 commit comments

Comments
 (0)