sanitize_dict_keys

glotaran.utils.sanitize.sanitize_dict_keys(d: dict) dict[source]

Sanitize the stringified tuple dict keys in a yaml parsed dict.

Keys representing a tuple, e.g. ‘(s1, s2)’ are converted to a tuple of strings

e.g. (‘s1’, ‘s2’)

Parameters:

d (dict) – A dict containing tuple-like string keys

Returns:

A dict with tuple-like string keys converted to tuple keys

Return type:

dict