File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 1717from narwhals ._plan .literal import SeriesLiteral
1818from narwhals ._plan .strings import ConcatHorizontal
1919from narwhals .dtypes import DType
20- from narwhals .dtypes import Unknown
2120from narwhals .exceptions import OrderDependentExprError
21+ from narwhals .utils import Version
2222from narwhals .utils import flatten
2323
2424if 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
Original file line number Diff line number Diff line change 1313from narwhals ._plan .options import SortOptions
1414from narwhals ._plan .window import Over
1515from narwhals .dtypes import DType
16- from narwhals .dtypes import Unknown
16+ from narwhals .utils import Version
1717from narwhals .utils import flatten
1818
1919if 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 :
You can’t perform that action at this time.
0 commit comments