-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
added sort flag to yaml method arguments #1090
Conversation
ping @markpeek |
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.
Cool. So this doesn't change the default behavior (it's currently True
) but it allows the end user to optionally not sort keys.
@ror6ax thanks...I'm traveling and will take a look over the weekend unless @phobologic gets to it before me. |
troposphere/__init__.py
Outdated
def to_yaml(self, clean_up=False, long_form=False): | ||
return cfn_flip.to_yaml(self.to_json(), clean_up=clean_up, | ||
def to_yaml(self, clean_up=False, long_form=False, sort_keys=True): | ||
return cfn_flip.to_yaml(self.to_json(sort_keys), clean_up=clean_up, |
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.
I'm not sure this would work. Shouldn't that be a named param like this (otherwise it would match the indent param):
return cfn_flip.to_yaml(self.to_json(sort_keys=sort_keys), clean_up=clean_up,
Why this is PR is still not incorporated? |
@sumanth-lingappa thank you for highlighting. I had not seen the force push with the suggested fix. |
Fixes #1089