44
55from  narwhals ._compliant .expr  import  NativeExpr 
66
7- if  TYPE_CHECKING :
8-     from  narwhals ._sql .dataframe  import  SQLLazyFrame 
9-     from  narwhals ._sql .expr  import  SQLExpr 
10-     from  narwhals .dtypes  import  Boolean 
11-     from  typing_extensions  import  Self 
12- 
13-     # TODO: @mp, understand why these are here & if we need one for NativeSQLExprT 
14-     SQLExprAny  =  SQLExpr [Any , Any ]
15-     SQLLazyFrameAny  =  SQLLazyFrame [Any , Any , Any ]
16- 
17- SQLExprT  =  TypeVar ("SQLExprT" , bound = "SQLExprAny" )
18- SQLExprT_contra  =  TypeVar ("SQLExprT_contra" , bound = "SQLExprAny" , contravariant = True )
19- SQLLazyFrameT  =  TypeVar ("SQLLazyFrameT" , bound = "SQLLazyFrameAny" )
20- # TODO: @mp, should this be contravariant as to do with function arguments? think through! 
21- NativeSQLExprT  =  TypeVar ("NativeSQLExprT" , bound = "NativeSQLExpr" ) 
22- 
237class  NativeSQLExpr (NativeExpr ):
248    # both Self because we're comparing an expression with an expression?  
259    def  __gt__ (self , value : Self ) ->  Self : ...
@@ -41,3 +25,22 @@ def __add__(self, value: Self) -> Self: ...
4125    def  __truediv__ (self , value : Self ) ->  Self : ...
4226
4327    def  __mul__ (self , value : Self ) ->  Self : ...
28+ 
29+ if  TYPE_CHECKING :
30+     from  narwhals ._sql .dataframe  import  SQLLazyFrame 
31+     from  narwhals ._sql .expr  import  SQLExpr 
32+     from  narwhals .dtypes  import  Boolean 
33+     from  typing_extensions  import  Self 
34+ 
35+     # TODO: @mp, understand why these are here & if we need one for NativeSQLExprT; 
36+     # seem to reflect number of different 'catgories' each of the parent class has 
37+     # tbc! since NativeExpr only has Protocol, I don't think we need this for NativeSQLExpr 
38+     SQLExprAny  =  SQLExpr [Any , Any ]
39+     SQLLazyFrameAny  =  SQLLazyFrame [Any , Any , Any ]
40+ 
41+ SQLExprT  =  TypeVar ("SQLExprT" , bound = "SQLExprAny" )
42+ SQLExprT_contra  =  TypeVar ("SQLExprT_contra" , bound = "SQLExprAny" , contravariant = True )
43+ SQLLazyFrameT  =  TypeVar ("SQLLazyFrameT" , bound = "SQLLazyFrameAny" )
44+ # TODO: @mp, should this be contravariant as to do with function arguments? think through! 
45+ NativeSQLExprT  =  TypeVar ("NativeSQLExprT" , bound = "NativeSQLExpr" ) 
46+ 
0 commit comments