@@ -216,53 +216,53 @@ class Version(Enum):
216216
217217 @property
218218 def namespace (self ) -> type [Namespace [Any ]]:
219- if self is Version .MAIN :
220- from narwhals ._namespace import Namespace
219+ if self is Version .V1 :
220+ from narwhals .stable . v1 . _namespace import Namespace as NamespaceV1
221221
222- return Namespace
223- from narwhals .stable . v1 . _namespace import Namespace
222+ return NamespaceV1
223+ from narwhals ._namespace import Namespace
224224
225225 return Namespace
226226
227227 @property
228228 def dtypes (self ) -> DTypes :
229- if self is Version .MAIN :
230- from narwhals import dtypes
229+ if self is Version .V1 :
230+ from narwhals . stable . v1 import dtypes as dtypes_v1
231231
232- return dtypes
233- from narwhals . stable . v1 import dtypes as v1_dtypes
232+ return dtypes_v1
233+ from narwhals import dtypes
234234
235- return v1_dtypes
235+ return dtypes
236236
237237 @property
238238 def dataframe (self ) -> type [DataFrame [Any ]]:
239- if self is Version .MAIN :
240- from narwhals .dataframe import DataFrame
239+ if self is Version .V1 :
240+ from narwhals .stable . v1 import DataFrame as DataFrameV1
241241
242- return DataFrame
243- from narwhals .stable . v1 import DataFrame as DataFrameV1
242+ return DataFrameV1
243+ from narwhals .dataframe import DataFrame
244244
245- return DataFrameV1
245+ return DataFrame
246246
247247 @property
248248 def lazyframe (self ) -> type [LazyFrame [Any ]]:
249- if self is Version .MAIN :
250- from narwhals .dataframe import LazyFrame
249+ if self is Version .V1 :
250+ from narwhals .stable . v1 import LazyFrame as LazyFrameV1
251251
252- return LazyFrame
253- from narwhals .stable . v1 import LazyFrame as LazyFrameV1
252+ return LazyFrameV1
253+ from narwhals .dataframe import LazyFrame
254254
255- return LazyFrameV1
255+ return LazyFrame
256256
257257 @property
258258 def series (self ) -> type [Series [Any ]]:
259- if self is Version .MAIN :
260- from narwhals .series import Series
259+ if self is Version .V1 :
260+ from narwhals .stable . v1 import Series as SeriesV1
261261
262- return Series
263- from narwhals .stable . v1 import Series as SeriesV1
262+ return SeriesV1
263+ from narwhals .series import Series
264264
265- return SeriesV1
265+ return Series
266266
267267
268268class Implementation (NoAutoEnum ):
0 commit comments