Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions narwhals/_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
_DuckDB: TypeAlias = Literal["duckdb"]
_Pandas: TypeAlias = Literal["pandas"]
_Modin: TypeAlias = Literal["modin"]
_Cudf: TypeAlias = Literal["cudf"]
_CuDF: TypeAlias = Literal["cudf"]
_PySpark: TypeAlias = Literal["pyspark"]
_SQLFrame: TypeAlias = Literal["sqlframe"]
_PySparkConnect: TypeAlias = Literal["pyspark[connect]"]
_Ibis: TypeAlias = Literal["ibis"]
_PandasLike: TypeAlias = Literal[_Pandas, _Cudf, _Modin]
_PandasLike: TypeAlias = Literal[_Pandas, _CuDF, _Modin]
_SparkLike: TypeAlias = Literal[_PySpark, _SQLFrame, _PySparkConnect]
_EagerOnly: TypeAlias = Literal[_PandasLike, _Arrow]
_EagerAllowed: TypeAlias = Literal[_Polars, _EagerOnly]
Expand All @@ -31,7 +31,7 @@
# `Implementation` aliases
_PandasImpl: TypeAlias = Literal[Implementation.PANDAS]
_ModinImpl: TypeAlias = Literal[Implementation.MODIN]
_CudfImpl: TypeAlias = Literal[Implementation.CUDF]
_CuDFImpl: TypeAlias = Literal[Implementation.CUDF]
_PySparkImpl: TypeAlias = Literal[Implementation.PYSPARK]
_SQLFrameImpl: TypeAlias = Literal[Implementation.SQLFRAME]
_PySparkConnectImpl: TypeAlias = Literal[Implementation.PYSPARK_CONNECT]
Expand All @@ -40,7 +40,7 @@
_DaskImpl: TypeAlias = Literal[Implementation.DASK]
_DuckDBImpl: TypeAlias = Literal[Implementation.DUCKDB]
_IbisImpl: TypeAlias = Literal[Implementation.IBIS]
_PandasLikeImpl: TypeAlias = Literal[_PandasImpl, _CudfImpl, _ModinImpl]
_PandasLikeImpl: TypeAlias = Literal[_PandasImpl, _CuDFImpl, _ModinImpl]
_SparkLikeImpl: TypeAlias = Literal[_PySparkImpl, _SQLFrameImpl, _PySparkConnectImpl]
_EagerOnlyImpl: TypeAlias = Literal[_PandasLikeImpl, _ArrowImpl]
_EagerAllowedImpl: TypeAlias = Literal[_EagerOnlyImpl, _PolarsImpl] # noqa: PYI047
Expand All @@ -54,7 +54,7 @@

# `str | Implementation` aliases
Pandas: TypeAlias = Literal[_Pandas, _PandasImpl]
Cudf: TypeAlias = Literal[_Cudf, _CudfImpl]
CuDF: TypeAlias = Literal[_CuDF, _CuDFImpl]
Modin: TypeAlias = Literal[_Modin, _ModinImpl]
PySpark: TypeAlias = Literal[_PySpark, _PySparkImpl]
SQLFrame: TypeAlias = Literal[_SQLFrame, _SQLFrameImpl]
Expand Down
6 changes: 3 additions & 3 deletions narwhals/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
Backend,
IntoBackend,
_ArrowImpl,
_CudfImpl,
_CuDFImpl,
_DaskImpl,
_DuckDBImpl,
_EagerAllowedImpl,
Expand Down Expand Up @@ -2111,8 +2111,8 @@ def __get__(self, instance: Narwhals[_NativePolars], owner: Any) -> _PolarsImpl:
def __get__(self, instance: Narwhals[_NativePandas], owner: Any) -> _PandasImpl: ...
@overload
def __get__(self, instance: Narwhals[_NativeModin], owner: Any) -> _ModinImpl: ...
@overload # TODO @dangotbanned: Rename `_typing` `*Cudf*` aliases to `*CuDF*`
def __get__(self, instance: Narwhals[_NativeCuDF], owner: Any) -> _CudfImpl: ...
@overload
def __get__(self, instance: Narwhals[_NativeCuDF], owner: Any) -> _CuDFImpl: ...
@overload
def __get__(
self, instance: Narwhals[_NativePandasLike], owner: Any
Expand Down
Loading