Skip to content
Snippets Groups Projects
Verified Commit f1323ea0 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

MAINT: Code cleanup.

parent 4a507ac1
No related branches found
No related tags found
2 merge requests!107Release v0.11.0,!102ENH: XLSX reader
Pipeline #50701 failed
......@@ -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``.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment