Skip to content

Commit 39382c5

Browse files
committed
chore(typing): Fill in more __getattr__ gaps
1 parent c5500a3 commit 39382c5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

narwhals/_polars/namespace.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,31 @@
2020
from datetime import timezone
2121

2222
from typing_extensions import Self
23+
from typing_extensions import TypeAlias
2324

25+
from narwhals._compliant import CompliantWhen
26+
from narwhals._polars.dataframe import Method
2427
from narwhals._polars.dataframe import PolarsDataFrame
2528
from narwhals._polars.dataframe import PolarsLazyFrame
2629
from narwhals.typing import TimeUnit
2730
from narwhals.utils import Version
31+
from narwhals.utils import _FullContext
32+
33+
Incomplete: TypeAlias = Any
2834

2935

3036
class PolarsNamespace:
37+
all: Method[PolarsExpr]
38+
col: Method[PolarsExpr]
39+
exclude: Method[PolarsExpr]
40+
all_horizontal: Method[PolarsExpr]
41+
any_horizontal: Method[PolarsExpr]
42+
sum_horizontal: Method[PolarsExpr]
43+
min_horizontal: Method[PolarsExpr]
44+
max_horizontal: Method[PolarsExpr]
45+
# NOTE: `PolarsSeries`, `PolarsExpr` still have gaps
46+
when: Method[CompliantWhen[PolarsDataFrame, Incomplete, Incomplete]]
47+
3148
def __init__(
3249
self: Self, *, backend_version: tuple[int, ...], version: Version
3350
) -> None:

0 commit comments

Comments
 (0)