From bbf014ed0f024b1dba0fcef9516c9bdf481ca57a Mon Sep 17 00:00:00 2001 From: Jonathan Shi Date: Mon, 22 Jul 2024 13:54:22 -0700 Subject: [PATCH] fix lints --- modin/core/storage_formats/base/query_compiler.py | 9 +++++++++ modin/core/storage_formats/pandas/query_compiler.py | 4 +--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/modin/core/storage_formats/base/query_compiler.py b/modin/core/storage_formats/base/query_compiler.py index 752599df5b4..dabc1aff7ce 100644 --- a/modin/core/storage_formats/base/query_compiler.py +++ b/modin/core/storage_formats/base/query_compiler.py @@ -218,6 +218,15 @@ def default_to_pandas(self, pandas_op, *args, **kwargs) -> Self: @property def lazy_shape(self): + """ + Whether either of the underlying dataframe's dimensions (row count/column count) are + computed lazily. If True, the frontend should avoid length/shape checks as much + as possible. + + Returns + ------- + bool + """ return self.lazy_row_count or self.lazy_column_count _shape_hint = None diff --git a/modin/core/storage_formats/pandas/query_compiler.py b/modin/core/storage_formats/pandas/query_compiler.py index 124486a786d..e79c3604ecc 100644 --- a/modin/core/storage_formats/pandas/query_compiler.py +++ b/modin/core/storage_formats/pandas/query_compiler.py @@ -1803,9 +1803,7 @@ def get_unique_level_values(index): new_index = ( get_unique_level_values(index) if consider_index - else index - if isinstance(index, list) - else [index] + else index if isinstance(index, list) else [index] ) new_columns = (