@@ -84,15 +84,15 @@ def func(*args: Any, **kwargs: Any) -> Any:
84
84
return func
85
85
86
86
def __array__ (self , dtype : Any | None = None , copy : bool | None = None ) -> np .ndarray :
87
- if self ._backend_version < (0 , 20 , 28 ) and copy is not None : # pragma: no cover
87
+ if self ._backend_version < (0 , 20 , 28 ) and copy is not None :
88
88
msg = "`copy` in `__array__` is only supported for Polars>=0.20.28"
89
89
raise NotImplementedError (msg )
90
- if self ._backend_version < (0 , 20 , 28 ): # pragma: no cover
90
+ if self ._backend_version < (0 , 20 , 28 ):
91
91
return self ._native_frame .__array__ (dtype )
92
92
return self ._native_frame .__array__ (dtype )
93
93
94
94
def collect_schema (self ) -> dict [str , Any ]:
95
- if self ._backend_version < (1 ,): # pragma: no cover
95
+ if self ._backend_version < (1 ,):
96
96
schema = self ._native_frame .schema
97
97
else :
98
98
schema = dict (self ._native_frame .collect_schema ())
@@ -209,12 +209,12 @@ def group_by(self, *by: str, drop_null_keys: bool) -> Any:
209
209
return PolarsGroupBy (self , list (by ), drop_null_keys = drop_null_keys )
210
210
211
211
def with_row_index (self , name : str ) -> Any :
212
- if self ._backend_version < (0 , 20 , 4 ): # pragma: no cover
212
+ if self ._backend_version < (0 , 20 , 4 ):
213
213
return self ._from_native_frame (self ._native_frame .with_row_count (name ))
214
214
return self ._from_native_frame (self ._native_frame .with_row_index (name ))
215
215
216
216
def drop (self : Self , columns : list [str ], strict : bool ) -> Self : # noqa: FBT001
217
- if self ._backend_version < (1 , 0 , 0 ): # pragma: no cover
217
+ if self ._backend_version < (1 , 0 , 0 ):
218
218
to_drop = parse_columns_to_drop (
219
219
compliant_frame = self , columns = columns , strict = strict
220
220
)
@@ -228,7 +228,7 @@ def unpivot(
228
228
variable_name : str | None ,
229
229
value_name : str | None ,
230
230
) -> Self :
231
- if self ._backend_version < (1 , 0 , 0 ): # pragma: no cover
231
+ if self ._backend_version < (1 , 0 , 0 ):
232
232
return self ._from_native_frame (
233
233
self ._native_frame .melt (
234
234
id_vars = index ,
@@ -296,7 +296,7 @@ def schema(self) -> dict[str, Any]:
296
296
}
297
297
298
298
def collect_schema (self ) -> dict [str , Any ]:
299
- if self ._backend_version < (1 ,): # pragma: no cover
299
+ if self ._backend_version < (1 ,):
300
300
schema = self ._native_frame .schema
301
301
else :
302
302
schema = dict (self ._native_frame .collect_schema ())
@@ -318,12 +318,12 @@ def group_by(self, *by: str, drop_null_keys: bool) -> Any:
318
318
return PolarsLazyGroupBy (self , list (by ), drop_null_keys = drop_null_keys )
319
319
320
320
def with_row_index (self , name : str ) -> Any :
321
- if self ._backend_version < (0 , 20 , 4 ): # pragma: no cover
321
+ if self ._backend_version < (0 , 20 , 4 ):
322
322
return self ._from_native_frame (self ._native_frame .with_row_count (name ))
323
323
return self ._from_native_frame (self ._native_frame .with_row_index (name ))
324
324
325
325
def drop (self : Self , columns : list [str ], strict : bool ) -> Self : # noqa: FBT001
326
- if self ._backend_version < (1 , 0 , 0 ): # pragma: no cover
326
+ if self ._backend_version < (1 , 0 , 0 ):
327
327
return self ._from_native_frame (self ._native_frame .drop (columns ))
328
328
return self ._from_native_frame (self ._native_frame .drop (columns , strict = strict ))
329
329
@@ -334,7 +334,7 @@ def unpivot(
334
334
variable_name : str | None ,
335
335
value_name : str | None ,
336
336
) -> Self :
337
- if self ._backend_version < (1 , 0 , 0 ): # pragma: no cover
337
+ if self ._backend_version < (1 , 0 , 0 ):
338
338
return self ._from_native_frame (
339
339
self ._native_frame .melt (
340
340
id_vars = index ,
0 commit comments