From 1895fdc1490a082ca08250b52093d3bbefce43c9 Mon Sep 17 00:00:00 2001 From: Zain Sohail Date: Sat, 4 Nov 2023 20:09:54 +0100 Subject: [PATCH] fix the lint error --- sed/loader/flash/loader.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sed/loader/flash/loader.py b/sed/loader/flash/loader.py index b0beefd6..112c67da 100644 --- a/sed/loader/flash/loader.py +++ b/sed/loader/flash/loader.py @@ -662,8 +662,9 @@ def buffer_file_handler(self, data_parquet_dir: Path, detector: str, force_recre # check if available_channels are same as schema available_channels_set = set(self.available_channels) - for i in len(schema): - schema_set = set(schema[i]) + + for i in range(len(schema)): + schema_set = set(schema[i].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( @@ -757,7 +758,7 @@ def parquet_handler( else: # Obtain the parquet filenames, metadata and schema from the method # which handles buffer file creation/reading - filenames, metadata, schema = self.buffer_file_handler( + filenames, metadata, _ = self.buffer_file_handler( data_parquet_dir, detector, force_recreate,