-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix duplicate anchors #57
Conversation
Pull Request Test Coverage Report for Build 1250
💛 - Coveralls |
emloop/utils/yaml.py
Outdated
@@ -52,7 +52,7 @@ def make_simple(data: Any) -> Any: | |||
:param data: data to be made simple (dict instead of CommentedMap etc.) | |||
:return: simplified data | |||
""" | |||
return yaml.load(yaml.dump(data, Dumper=ruamel.yaml.RoundTripDumper), Loader=ruamel.yaml.Loader) | |||
return dict(data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this works (not sure), than the whole make_simple
is useless and dict
should be used instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. @bedapisl claims that the original issue with dict cast is fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @bedapisl !
Well... this will not convert anything nested right?... |
I don't know what exactly you mean, but the class we are converting is nested in a way (it represents nested yaml configuration) and it looks like it is converted correctly. |
I actually don't remember why we need the conversion whatsoever. Maybe we can skip the |
Filip: The example in https://github.com/Cognexa/cxflow/pull/222 works for me now, so this code should work too.