-
Notifications
You must be signed in to change notification settings - Fork 146
fix TypeVar
used in (SparkLike|DuckDB)Expr
#2044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
thanks! we may want to just make |
Sounds interesting @MarcoGorelli I'm exploring an idea that seems it could be related - I should have something more concrete to share later today. Essentially, I think the It sounds like |
sure sounds good, thanks for your investigations! |
@MarcoGorelli I've just pushed to https://github.com/narwhals-dev/narwhals/tree/reuse-sub-protocols Hope you can get the gist of where I'm going there . Didn't wanna make it a PR yet since it'll touch too much and be a headache to keep in sync |
Didn't resolve any issues, better solution in (#2044 (comment))
@MarcoGorelli The distinction would be CompliantSeriesT_co = TypeVar(
"CompliantSeriesT_co", bound="CompliantSeries", covariant=True
)
NativeExprT_co = TypeVar("NativeExprT_co", bound="NativeExpr", covariant=True)
class CompliantSeries(Protocol): ...
class NativeExpr(Protocol): ...
# TODO: Find some common property each share
class EagerExpr(Generic[CompliantSeriesT_co], Protocol): ...
class LazyExpr(Generic[NativeExprT_co], Protocol): ...
CompliantExpr
Lines 79 to 110 in 4dda548
And class DaskExpr(LazyExpr["dask.dataframe.Series"]): ...
class DuckDBExpr(LazyExpr["duckdb.Expression"]): ...
class SparkLikeExpr(LazyExpr["pyspark.sql.Column"]): ... Note
|
- Only showing locally when `dask` is installed - Hoping it doesn't show in CI as unused - Can't fix until #2044
Didn't resolve any issues, better solution in (#2044 (comment))
- Big overlap with the gaps in `DaskExpr` - Probably should move bits into #2044 (comment)
Uh oh!
There was an error while loading. Please reload this page.
Originally posted by @EdAbati in #2005 (comment)
The text was updated successfully, but these errors were encountered: