From fdeda34b9da79b83887c36088e69c68bf71fa682 Mon Sep 17 00:00:00 2001 From: Rubel Date: Tue, 28 Nov 2023 17:39:47 +0100 Subject: [PATCH] removing x-ray utils in from xrd reader. --- pynxtools/dataconverter/readers/xrd/xrd_helper.py | 1 + pynxtools/dataconverter/readers/xrd/xrd_parser.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pynxtools/dataconverter/readers/xrd/xrd_helper.py b/pynxtools/dataconverter/readers/xrd/xrd_helper.py index b7112d5e6..057804bdd 100644 --- a/pynxtools/dataconverter/readers/xrd/xrd_helper.py +++ b/pynxtools/dataconverter/readers/xrd/xrd_helper.py @@ -36,6 +36,7 @@ def get_a_value_or_warn(return_value="", return return_value +# pylint: disable=too-many-statements def feed_xrdml_to_template(template, xrd_dict, eln_dict, file_term, config_dict=None): """Fill template with data from xrdml type file. diff --git a/pynxtools/dataconverter/readers/xrd/xrd_parser.py b/pynxtools/dataconverter/readers/xrd/xrd_parser.py index c0fb8d8ea..467d58375 100644 --- a/pynxtools/dataconverter/readers/xrd/xrd_parser.py +++ b/pynxtools/dataconverter/readers/xrd/xrd_parser.py @@ -23,7 +23,6 @@ from pathlib import Path import warnings import xml.etree.ElementTree as ET # for XML parsing -from xrayutilities.io.panalytical_xml import XRDMLFile # for reading XRDML files from pynxtools.dataconverter.helpers import transform_to_intended_dt, remove_namespace_from_tag from pynxtools.dataconverter.readers.xrd.xrd_helper import feed_xrdml_to_template @@ -187,13 +186,13 @@ def parse_each_elm(self, parent_path, xml_node, _, multi_childs_tag = self.has_multi_childs_with_same_tag(xml_node) # List of tag extensions for child nodes which have the same tag. - tag_extensions: List[int] = [0] + tag_extensions = [0] for child in iter(xml_node): if child is not None: self.parse_each_elm(parent_path, child, multi_childs_tag, tag_extensions) - def has_multi_childs_with_same_tag(self, parent_node: ET.Element) -> Tuple[str, bool]: + def has_multi_childs_with_same_tag(self, parent_node: ET.Element) -> Tuple[bool, str]: """Check for multiple childs that have the same tag. Parameter: