Skip to content
Snippets Groups Projects
Commit 02340e8b authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

ENH(converters): DictElementConverter can now match_properties

parent d82811f0
No related branches found
No related tags found
2 merge requests!217TST: Make NamedTemporaryFiles Windows-compatible,!199Match properties feature for DictElementConverter
Pipeline #57621 failed
......@@ -950,7 +950,12 @@ class DictElementConverter(Converter):
# TODO: See comment on types and inheritance
if not isinstance(element, DictElement):
raise RuntimeError("Element must be a DictElement.")
return match_name_and_value(self.definition, element.name, element.value)
vardict = match_name_and_value(self.definition, element.name, element.value)
if not self.match_properties(element.value.items(), vardict):
return None
return vardict
class PropertiesFromDictConverter(DictElementConverter):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment