Skip to content

Commit

Permalink
Address lint warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
delucchi-cmu committed Nov 14, 2023
1 parent ad5f8d5 commit 1ba7fb2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/lsdb/loaders/hipscat/hipscat_catalog_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import dask.dataframe as dd
import hipscat as hc
import pyarrow
from hipscat.io.file_io import file_io, file_pointer
from hipscat.io.file_io import file_io
from hipscat.pixel_math import HealpixPixel
from hipscat.pixel_math.hipscat_id import HIPSCAT_ID_HEALPIX_ORDER

Expand Down Expand Up @@ -74,7 +74,7 @@ def _get_paths_from_pixels(
def _load_df_from_paths(
self, catalog: hc.catalog.Catalog, paths: List[hc.io.FilePointer]
) -> dd.DataFrame:
metadata_schema = self._load_parquet_metadata_schema(catalog, paths)
metadata_schema = self._load_parquet_metadata_schema(catalog)
dask_meta_schema = metadata_schema.empty_table().to_pandas()
ddf = dd.from_map(
file_io.read_parquet_file_to_pandas,
Expand All @@ -84,9 +84,7 @@ def _load_df_from_paths(
)
return ddf

def _load_parquet_metadata_schema(
self, catalog: hc.catalog.Catalog, paths: List[hc.io.FilePointer]
) -> pyarrow.Schema:
def _load_parquet_metadata_schema(self, catalog: hc.catalog.Catalog) -> pyarrow.Schema:
metadata_pointer = hc.io.paths.get_parquet_metadata_pointer(catalog.catalog_base_dir)
metadata = file_io.read_parquet_metadata(metadata_pointer, storage_options=self.storage_options)
return metadata.schema.to_arrow_schema()

0 comments on commit 1ba7fb2

Please sign in to comment.