Skip to content

Commit 86ed14a

Browse files
committed
wip improved types
1 parent fda9a7d commit 86ed14a

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

narwhals/_sql/typing.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
if TYPE_CHECKING:
88
from narwhals._sql.dataframe import SQLLazyFrame
99
from narwhals._sql.expr import SQLExpr
10+
from narwhals.dtypes import Boolean
1011

1112
SQLExprAny = SQLExpr[Any, Any]
1213
SQLLazyFrameAny = SQLLazyFrame[Any, Any, Any]
@@ -17,6 +18,23 @@
1718

1819

1920
class NativeSQLExpr(NativeExpr):
20-
def __gt__(self, other: Any) -> Any: ...
21+
# TODO @mp: fix input type for all these!
22+
def __gt__(self, value: float) -> Boolean: ...
2123

22-
def __le__(self, other: Any) -> Any: ...
24+
def __lt__(self, value: float) -> Boolean: ...
25+
26+
def __ge__(self, value: float) -> Boolean: ...
27+
28+
def __le__(self, value: float) -> Boolean: ...
29+
30+
def __eq__(self, value: float) -> Boolean: ...
31+
32+
def __ne__(self, value: float) -> Boolean: ...
33+
# do we want any more of the arithmetic methods? I wasn't sure between lefthan & righthand methods..
34+
def __sub__(self, value: float) -> Any: ...
35+
36+
def __add__(self, value: float) -> Any: ...
37+
38+
def __truediv__(self, value: float) -> Any: ...
39+
40+
def __mul__(self, value: float) -> Any: ...

0 commit comments

Comments
 (0)