sanitize
Glotaran module with utilities for sanitation of parsed content.
Functions
Summary
Convert value to float if it matches scientific notation string.
Convert a list of strings (representing tuples) to a list of tuples.
Format value with with at most
decimal_places
decimal places.Sanitize the stringified tuple dict keys in a yaml parsed dict.
Sanitizes a dict with broken tuples inside modifying it in-place.
Sanitize a list with 'broken' tuples.
Replace in a list strings matching scientific notation with floats.
Sanitize a yaml-returned dict for key or (list) values containing tuples.
Convert scientific notation string values to floats.
Convert a string to a tuple if it matches a tuple pattern.