Skip to content

Commit

Permalink
fix the lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
zain-sohail committed Nov 4, 2023
1 parent 1895fdc commit fd5c13a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sed/loader/flash/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,14 +657,14 @@ def buffer_file_handler(self, data_parquet_dir: Path, detector: str, force_recre
raise ValueError("No data available. Probably failed reading all h5 files")

# read parquet metadata and schema
metadata = [pq.read_metadata(file) for file in existing_parquet_filenames]
schema = [pq.read_schema(file) for file in existing_parquet_filenames]
metadatas = [pq.read_metadata(file) for file in existing_parquet_filenames]
schemas = [pq.read_schema(file) for file in existing_parquet_filenames]

# check if available_channels are same as schema
available_channels_set = set(self.available_channels)

for i in range(len(schema)):
schema_set = set(schema[i].names)
for i, schema in enumerate(schemas):
schema_set = set(schema.names)
# Check if available_channels are the same as schema including pulseId
if not force_recreate and schema_set != available_channels_set.union({"pulseId"}):
raise ValueError(
Expand Down Expand Up @@ -703,7 +703,7 @@ def buffer_file_handler(self, data_parquet_dir: Path, detector: str, force_recre

print("All files converted successfully!")

return parquet_filenames, metadata, schema
return parquet_filenames, metadatas, schemas

def parquet_handler(
self,
Expand Down

0 comments on commit fd5c13a

Please sign in to comment.