blob: f96243b0b9b966d2fb465db0ba63ba8d887acd62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
from __future__ import annotations
from typing import TYPE_CHECKING
from narwhals._compliant import CompliantSelector, LazySelectorNamespace
from narwhals._ibis.expr import IbisExpr
if TYPE_CHECKING:
import ibis.expr.types as ir # noqa: F401
from narwhals._ibis.dataframe import IbisLazyFrame # noqa: F401
class IbisSelectorNamespace(LazySelectorNamespace["IbisLazyFrame", "ir.Value"]):
@property
def _selector(self) -> type[IbisSelector]:
return IbisSelector
class IbisSelector( # type: ignore[misc]
CompliantSelector["IbisLazyFrame", "ir.Value"], IbisExpr
):
def _to_expr(self) -> IbisExpr:
return IbisExpr(
self._call,
evaluate_output_names=self._evaluate_output_names,
alias_output_names=self._alias_output_names,
backend_version=self._backend_version,
version=self._version,
)
|