Skip to content

Commit

Permalink
fix mypy errors
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <[email protected]>
  • Loading branch information
anmyachev committed May 7, 2024
1 parent 130f489 commit d0ebdd2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions modin/core/dataframe/pandas/dataframe/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
ProtocolDataframe,
)
from pandas._typing import npt
from modin.core.dataframe.pandas.partitioning.partition_manager import (
PandasDataframePartitionManager,
)

from modin.logging import ClassLogger
from modin.logging.config import LogLevel
Expand Down Expand Up @@ -95,7 +98,7 @@ class PandasDataframe(
The data types for the dataframe columns.
"""

_partition_mgr_cls = None
_partition_mgr_cls: PandasDataframePartitionManager
_query_compiler_cls = PandasQueryCompiler
# These properties flag whether or not we are deferring the metadata synchronization
_deferred_index = False
Expand Down Expand Up @@ -874,7 +877,7 @@ def synchronize_labels(self, axis=None):
else:
self._deferred_column = True

def _propagate_index_objs(self, axis=None):
def _propagate_index_objs(self, axis=None) -> None:
"""
Synchronize labels by applying the index object for specific `axis` to the `self._partitions` lazily.
Expand Down
4 changes: 2 additions & 2 deletions modin/distributed/dataframe/pandas/partitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def unwrap_partitions(
f"Only API Layer objects may be passed in here, got {type(api_layer_object)} instead."
)

modin_frame = api_layer_object._query_compiler._modin_frame # type: ignore[attr-defined]
modin_frame = api_layer_object._query_compiler._modin_frame
modin_frame._propagate_index_objs(None)
if axis is None:

Expand Down Expand Up @@ -122,7 +122,7 @@ def get_block(partition: PartitionUnionType) -> np.ndarray:
]

actual_engine = type(
api_layer_object._query_compiler._modin_frame._partitions[0][0] # type: ignore[attr-defined]
api_layer_object._query_compiler._modin_frame._partitions[0][0]
).__name__
if actual_engine in (
"PandasOnRayDataframePartition",
Expand Down

0 comments on commit d0ebdd2

Please sign in to comment.