Skip to content

Add protocols for LazyExpr*Namespace #2500

Open
@dangotbanned

Description

@dangotbanned

Originally posted by @dangotbanned in #2000 (comment)

Realised while reviewing (#2000) that we're not enforcing the newer-style protocols for most ofLazyExpr.
The one exception being LazyExprNameNamespace.

@property
def name(self) -> LazyExprNameNamespace[Self]:
return LazyExprNameNamespace(self)
class _ExprNamespace( # type: ignore[misc]
_StoresCompliant[CompliantExprT_co], Protocol[CompliantExprT_co]

Everything else is Any, which IIRC was for the benefit of not_implemented 🤔

@property
def str(self) -> Any: ...
@property
def name(self) -> Any: ...
@property
def dt(self) -> Any: ...
@property
def cat(self) -> Any: ...
@property
def list(self) -> Any: ...
@property
def struct(self) -> Any: ...

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    daskIssue is related to dask backendduckdbIssue is related to duckdb backendinternalspark-like

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions