From 7f4aff34c87aba59120d9271833a508397d8839b Mon Sep 17 00:00:00 2001 From: Rubel Date: Wed, 22 Nov 2023 09:45:53 +0100 Subject: [PATCH] ci --- pynxtools/dataconverter/helpers.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pynxtools/dataconverter/helpers.py b/pynxtools/dataconverter/helpers.py index f43556846..b592bd96a 100644 --- a/pynxtools/dataconverter/helpers.py +++ b/pynxtools/dataconverter/helpers.py @@ -621,10 +621,10 @@ def extract_atom_types(formula, mode='hill'): return atom_types -def transform_to_intended_dt(str_value) -> Optional[Any]: - """ - Transform string to the intended data type, if not then return str_value. - e.g '2.5E-2' will be transfor into 2.5E-2 +def transform_to_intended_dt(str_value: Any) -> Optional[Any]: + """Transform string to the intended data type, if not then return str_value. + + E.g '2.5E-2' will be transfor into 2.5E-2 tested with: '2.4E-23', '28', '45.98', 'test', ['59', '3.00005', '498E-34'], '23 34 444 5000', None with result: 2.4e-23, 28, 45.98, test, [5.90000e+01 3.00005e+00 4.98000e-32], @@ -643,7 +643,7 @@ def transform_to_intended_dt(str_value) -> Optional[Any]: """ symbol_list_for_data_seperation = [';', ' '] - transformed = "" + transformed: Any = None if isinstance(str_value, list): try: