File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 55from typing import Any
66from typing import Iterable
77from typing import Literal
8+ from typing import cast
89from typing import overload
910
1011import polars as pl
2223 from typing_extensions import Self
2324 from typing_extensions import TypeAlias
2425
26+ from narwhals ._compliant import CompliantSelectorNamespace
2527 from narwhals ._compliant import CompliantWhen
2628 from narwhals ._polars .dataframe import Method
2729 from narwhals ._polars .dataframe import PolarsDataFrame
@@ -204,9 +206,14 @@ def concat_str(
204206 backend_version = self ._backend_version ,
205207 )
206208
209+ # NOTE: Implementation is too different to annotate correctly (vs other `*SelectorNamespace`)
210+ # 1. Others have lots of private stuff for code reuse
211+ # i. None of that is useful here
212+ # 2. We don't have a `PolarsSelector` abstraction, and just use `PolarsExpr`
213+ # 3. `PolarsExpr` still has it's own gaps in the spec
207214 @property
208- def selectors (self : Self ) -> PolarsSelectorNamespace :
209- return PolarsSelectorNamespace (self )
215+ def selectors (self : Self ) -> CompliantSelectorNamespace [ Any , Any ] :
216+ return cast ( "CompliantSelectorNamespace[Any, Any]" , PolarsSelectorNamespace (self ) )
210217
211218
212219class PolarsSelectorNamespace :
You can’t perform that action at this time.
0 commit comments