Skip to content

Commit 9ca3602

Browse files
authored
chore: Rename _typing.*Cudf* aliases to *CuDF* (#3090)
- Follow-up to #3016 - Doesn't quite fit into #3086
1 parent 1266287 commit 9ca3602

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

narwhals/_typing.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
_DuckDB: TypeAlias = Literal["duckdb"]
1717
_Pandas: TypeAlias = Literal["pandas"]
1818
_Modin: TypeAlias = Literal["modin"]
19-
_Cudf: TypeAlias = Literal["cudf"]
19+
_CuDF: TypeAlias = Literal["cudf"]
2020
_PySpark: TypeAlias = Literal["pyspark"]
2121
_SQLFrame: TypeAlias = Literal["sqlframe"]
2222
_PySparkConnect: TypeAlias = Literal["pyspark[connect]"]
2323
_Ibis: TypeAlias = Literal["ibis"]
24-
_PandasLike: TypeAlias = Literal[_Pandas, _Cudf, _Modin]
24+
_PandasLike: TypeAlias = Literal[_Pandas, _CuDF, _Modin]
2525
_SparkLike: TypeAlias = Literal[_PySpark, _SQLFrame, _PySparkConnect]
2626
_EagerOnly: TypeAlias = Literal[_PandasLike, _Arrow]
2727
_EagerAllowed: TypeAlias = Literal[_Polars, _EagerOnly]
@@ -31,7 +31,7 @@
3131
# `Implementation` aliases
3232
_PandasImpl: TypeAlias = Literal[Implementation.PANDAS]
3333
_ModinImpl: TypeAlias = Literal[Implementation.MODIN]
34-
_CudfImpl: TypeAlias = Literal[Implementation.CUDF]
34+
_CuDFImpl: TypeAlias = Literal[Implementation.CUDF]
3535
_PySparkImpl: TypeAlias = Literal[Implementation.PYSPARK]
3636
_SQLFrameImpl: TypeAlias = Literal[Implementation.SQLFRAME]
3737
_PySparkConnectImpl: TypeAlias = Literal[Implementation.PYSPARK_CONNECT]
@@ -40,7 +40,7 @@
4040
_DaskImpl: TypeAlias = Literal[Implementation.DASK]
4141
_DuckDBImpl: TypeAlias = Literal[Implementation.DUCKDB]
4242
_IbisImpl: TypeAlias = Literal[Implementation.IBIS]
43-
_PandasLikeImpl: TypeAlias = Literal[_PandasImpl, _CudfImpl, _ModinImpl]
43+
_PandasLikeImpl: TypeAlias = Literal[_PandasImpl, _CuDFImpl, _ModinImpl]
4444
_SparkLikeImpl: TypeAlias = Literal[_PySparkImpl, _SQLFrameImpl, _PySparkConnectImpl]
4545
_EagerOnlyImpl: TypeAlias = Literal[_PandasLikeImpl, _ArrowImpl]
4646
_EagerAllowedImpl: TypeAlias = Literal[_EagerOnlyImpl, _PolarsImpl] # noqa: PYI047
@@ -54,7 +54,7 @@
5454

5555
# `str | Implementation` aliases
5656
Pandas: TypeAlias = Literal[_Pandas, _PandasImpl]
57-
Cudf: TypeAlias = Literal[_Cudf, _CudfImpl]
57+
CuDF: TypeAlias = Literal[_CuDF, _CuDFImpl]
5858
Modin: TypeAlias = Literal[_Modin, _ModinImpl]
5959
PySpark: TypeAlias = Literal[_PySpark, _PySparkImpl]
6060
SQLFrame: TypeAlias = Literal[_SQLFrame, _SQLFrameImpl]

narwhals/_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
Backend,
9494
IntoBackend,
9595
_ArrowImpl,
96-
_CudfImpl,
96+
_CuDFImpl,
9797
_DaskImpl,
9898
_DuckDBImpl,
9999
_EagerAllowedImpl,
@@ -2111,8 +2111,8 @@ def __get__(self, instance: Narwhals[_NativePolars], owner: Any) -> _PolarsImpl:
21112111
def __get__(self, instance: Narwhals[_NativePandas], owner: Any) -> _PandasImpl: ...
21122112
@overload
21132113
def __get__(self, instance: Narwhals[_NativeModin], owner: Any) -> _ModinImpl: ...
2114-
@overload # TODO @dangotbanned: Rename `_typing` `*Cudf*` aliases to `*CuDF*`
2115-
def __get__(self, instance: Narwhals[_NativeCuDF], owner: Any) -> _CudfImpl: ...
2114+
@overload
2115+
def __get__(self, instance: Narwhals[_NativeCuDF], owner: Any) -> _CuDFImpl: ...
21162116
@overload
21172117
def __get__(
21182118
self, instance: Narwhals[_NativePandasLike], owner: Any

0 commit comments

Comments
 (0)