Skip to content

Commit bbba0fe

Browse files
committed
1 parent 047c815 commit bbba0fe

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

narwhals/_plan/demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
from narwhals._plan.literal import SeriesLiteral
1818
from narwhals._plan.strings import ConcatHorizontal
1919
from narwhals.dtypes import DType
20-
from narwhals.dtypes import Unknown
2120
from narwhals.exceptions import OrderDependentExprError
21+
from narwhals.utils import Version
2222
from narwhals.utils import flatten
2323

2424
if t.TYPE_CHECKING:
@@ -56,7 +56,7 @@ def lit(
5656
if isinstance(value, DummySeries):
5757
return SeriesLiteral(value=value).to_literal().to_narwhals()
5858
if dtype is None or not isinstance(dtype, DType):
59-
dtype = Unknown()
59+
dtype = Version.MAIN.dtypes.Unknown()
6060
return ScalarLiteral(value=value, dtype=dtype).to_literal().to_narwhals()
6161

6262

narwhals/_plan/dummy.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from narwhals._plan.options import SortOptions
1414
from narwhals._plan.window import Over
1515
from narwhals.dtypes import DType
16-
from narwhals.dtypes import Unknown
16+
from narwhals.utils import Version
1717
from narwhals.utils import flatten
1818

1919
if TYPE_CHECKING:
@@ -43,7 +43,7 @@ def alias(self, name: str) -> Self:
4343
return self._from_ir(expr.Alias(expr=self._ir, name=name))
4444

4545
def cast(self, dtype: DType | type[DType]) -> Self:
46-
dtype = dtype if isinstance(dtype, DType) else Unknown()
46+
dtype = dtype if isinstance(dtype, DType) else Version.MAIN.dtypes.Unknown()
4747
return self._from_ir(expr.Cast(expr=self._ir, dtype=dtype))
4848

4949
def count(self) -> Self:
@@ -215,9 +215,7 @@ class DummyCompliantSeries:
215215

216216
@property
217217
def dtype(self) -> DType:
218-
from narwhals.dtypes import Float64
219-
220-
return Float64()
218+
return Version.MAIN.dtypes.Float64()
221219

222220
@property
223221
def name(self) -> str:

0 commit comments

Comments
 (0)