From f1323ea0db2a8ef4a55d334b32d7a404b2aec594 Mon Sep 17 00:00:00 2001 From: Daniel <d.hornung@indiscale.com> Date: Fri, 3 May 2024 14:47:15 +0200 Subject: [PATCH] MAINT: Code cleanup. --- src/caosadvancedtools/table_json_conversion/convert.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/caosadvancedtools/table_json_conversion/convert.py b/src/caosadvancedtools/table_json_conversion/convert.py index 02c46bd1..586def7a 100644 --- a/src/caosadvancedtools/table_json_conversion/convert.py +++ b/src/caosadvancedtools/table_json_conversion/convert.py @@ -103,8 +103,6 @@ Look at ``xlsx_utils.get_path_position`` for the specification of the "proper na data_column_paths = {col.index: col.path for col in data_columns.values()} # Parent path, insert in correct order. parent, proper_name = xlsx_utils.get_path_position(sheet) - # print(parent, proper_name, sheet.title) - # breakpoint() if parent: parent_sheetname = xlsx_utils.get_worksheet_for_path(parent, self._defining_path_index) if parent_sheetname not in self._handled_sheets: @@ -148,7 +146,6 @@ Look at ``xlsx_utils.get_path_position`` for the specification of the "proper na value = self._validate_and_convert(value, path) _set_in_nested(mydict=data, path=path, value=value, prefix=parent, skip=1) continue - continue # Find current position in tree parent_dict = self._get_parent_dict(parent_path=parent, foreign=foreign) @@ -157,11 +154,7 @@ Look at ``xlsx_utils.get_path_position`` for the specification of the "proper na if proper_name not in parent_dict: parent_dict[proper_name] = [] parent_dict[proper_name].append(data) - # breakpoint() - # if sheet.title == "Training.Organisation": - # breakpoint() self._handled_sheets.add(sheet.title) - # print(f"Added sheet: {sheet.title}") def _is_multiple_choice(self, path: list[str]) -> bool: """Test if the path belongs to a multiple choice section.""" @@ -318,7 +311,7 @@ mydict: dict path: list A list of keys, denoting the location of the value. value - The value inside the dict. + The value which shall be set inside the dict. prefix: list A list of keys which shall be removed from ``path``. A KeyError is raised if ``path`` does not start with the elements of ``prefix``. -- GitLab