Skip to content

Commit

Permalink
CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
RubelMozumder committed Dec 1, 2023
1 parent b831726 commit ecb891e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pynxtools/dataconverter/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ def extract_atom_types(formula, mode='hill'):

return atom_types


# pylint: disable=too-many-branches
def transform_to_intended_dt(str_value: Any) -> Optional[Any]:
"""Transform string to the intended data type, if not then return str_value.
Expand Down Expand Up @@ -700,10 +701,10 @@ def transform_to_intended_dt(str_value: Any) -> Optional[Any]:
for sym in symbol_list_for_data_seperation:
if sym in str_value:
parts = str_value.split(sym)
modified_parts = []
modified_parts: List = []
for part in parts:
part = transform_to_intended_dt(part)
if (isinstance(part, int) or isinstance(part, float)):
if isinstance(part, (int, float)):
modified_parts.append(part)
else:
return str_value
Expand Down

0 comments on commit ecb891e

Please sign in to comment.