@@ -191,11 +191,11 @@ def __narwhals_namespace__(self: Self) -> ArrowNamespace:
191191
192192 def __eq__ (self : Self , other : object ) -> Self : # type: ignore[override]
193193 ser , other = extract_native (self , other )
194- return self ._with_native (pc .equal (ser , other )) # type: ignore[arg-type ]
194+ return self ._with_native (pc .equal (ser , other )) # type: ignore[call-overload ]
195195
196196 def __ne__ (self : Self , other : object ) -> Self : # type: ignore[override]
197197 ser , other = extract_native (self , other )
198- return self ._with_native (pc .not_equal (ser , other )) # type: ignore[arg-type ]
198+ return self ._with_native (pc .not_equal (ser , other )) # type: ignore[call-overload ]
199199
200200 def __ge__ (self : Self , other : Any ) -> Self :
201201 ser , other = extract_native (self , other )
@@ -271,14 +271,14 @@ def __truediv__(self: Self, other: Any) -> Self:
271271 if not isinstance (other , (pa .Array , pa .ChunkedArray )):
272272 # scalar
273273 other = lit (other )
274- return self ._with_native (pc .divide (* cast_for_truediv (ser , other )))
274+ return self ._with_native (pc .divide (* cast_for_truediv (ser , other ))) # type: ignore[arg-type, type-var]
275275
276276 def __rtruediv__ (self : Self , other : Any ) -> Self :
277277 ser , other = extract_native (self , other )
278278 if not isinstance (other , (pa .Array , pa .ChunkedArray )):
279279 # scalar
280280 other = lit (other ) if not isinstance (other , pa .Scalar ) else other
281- return self ._with_native (pc .divide (* cast_for_truediv (other , ser ))) # pyright : ignore[reportArgumentType ]
281+ return self ._with_native (pc .divide (* cast_for_truediv (other , ser ))) # type : ignore[arg-type, type-var ]
282282
283283 def __mod__ (self : Self , other : Any ) -> Self :
284284 floor_div = (self // other ).native
@@ -596,11 +596,11 @@ def value_counts(
596596 counts = cast ("ArrowChunkedArray" , val_counts .field ("counts" ))
597597
598598 if normalize :
599- arrays = [values , pc .divide (* cast_for_truediv (counts , pc .sum (counts )))]
599+ arrays = [values , pc .divide (* cast_for_truediv (counts , pc .sum (counts )))] # type: ignore[type-var]
600600 else :
601601 arrays = [values , counts ]
602602
603- val_count = pa .Table .from_arrays (arrays , names = [index_name_ , value_name_ ])
603+ val_count = pa .Table .from_arrays (arrays , names = [index_name_ , value_name_ ]) # type: ignore[arg-type]
604604
605605 if sort :
606606 val_count = val_count .sort_by ([(value_name_ , "descending" )])
@@ -662,7 +662,7 @@ def fill_aux(
662662 )[::- 1 ]
663663 distance = valid_index - indices
664664 return pc .if_else (
665- pc .and_ (pc .is_null (arr ), pc .less_equal (distance , lit (limit ))),
665+ pc .and_ (pc .is_null (arr ), pc .less_equal (distance , lit (limit ))), # pyright: ignore[reportArgumentType, reportCallIssue]
666666 arr .take (valid_index ),
667667 arr ,
668668 )
@@ -1041,8 +1041,6 @@ def rank(
10411041 )
10421042 raise ValueError (msg )
10431043
1044- # ignore-banned-import
1045-
10461044 sort_keys : Order = "descending" if descending else "ascending"
10471045 tiebreaker : TieBreaker = "first" if method == "ordinal" else method
10481046
@@ -1078,7 +1076,7 @@ def _hist_from_bin_count(bin_count: int): # type: ignore[no-untyped-def] # noqa
10781076 lower , upper = d ["min" ], d ["max" ]
10791077 pa_float = pa .type_for_alias ("float" )
10801078 if lower == upper :
1081- range_ = lit (1.0 )
1079+ range_ : pa . Scalar [ Any ] = lit (1.0 )
10821080 mid = lit (0.5 )
10831081 width = pc .divide (range_ , lit (bin_count ))
10841082 lower = pc .subtract (lower , mid )
@@ -1094,9 +1092,9 @@ def _hist_from_bin_count(bin_count: int): # type: ignore[no-untyped-def] # noqa
10941092 bin_indices = pc .if_else (
10951093 pc .and_ (
10961094 pc .equal (bin_indices , bin_proportions ),
1097- pc .greater (bin_indices , 0 ),
1095+ pc .greater (bin_indices , lit ( 0 ) ),
10981096 ),
1099- pc .subtract (bin_indices , 1 ),
1097+ pc .subtract (bin_indices , lit ( 1 ) ),
11001098 bin_indices ,
11011099 )
11021100 possible = pa .Table .from_arrays (
0 commit comments