File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -152,17 +152,9 @@ def convert_types(self, in_dict):
152
152
153
153
def unflatten (self ):
154
154
main_sheet_by_ocid = OrderedDict ()
155
- for line in self .get_main_sheet_lines ():
156
- if all (x == '' for x in line .values ()):
157
- continue
158
- root_id_or_none = line [self .root_id ] if self .root_id else None
159
- if root_id_or_none not in main_sheet_by_ocid :
160
- main_sheet_by_ocid [root_id_or_none ] = TemporaryDict ('id' )
161
- main_sheet_by_ocid [root_id_or_none ].append (unflatten_main_with_parser (self .parser , line , self .timezone ))
162
-
163
- for sheet_name , lines in self .get_sub_sheets_lines ():
164
- for i , line in enumerate (lines ):
165
- lineno = i + 1
155
+ # Eventually we should get rid of the concept of a "main sheet entirely"
156
+ for sheet_name , lines in [(self .main_sheet_name , self .get_main_sheet_lines ())] + list (self .get_sub_sheets_lines ()):
157
+ for line in lines :
166
158
if all (x == '' for x in line .values ()):
167
159
continue
168
160
root_id_or_none = line [self .root_id ] if self .root_id else None
You can’t perform that action at this time.
0 commit comments