Skip to content

Commit

Permalink
Fix incorrect use of sorted
Browse files Browse the repository at this point in the history
Calling `sorted` on a dict will return only the keys, sorted. This is
not necessary anyway, since `sort_keys` will take care of sorting.
  • Loading branch information
pitkley committed Nov 22, 2020
1 parent 3ff9b4a commit 29f84e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hack/generate-index-cfn.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def main(cfn_docs_root: Path):
fh.write("// Descriptions retrieved from: https://github.com/awsdocs/aws-cloudformation-user-guide/\n")
fh.write("// They are licensed under the Creative Commons Attribution-ShareAlike 4.0 International Public License, copyright Amazon Web Services, Inc.\n")
fh.write("var cfnSearchIndex=")
json.dump(sorted(final_index), fh, sort_keys=True)
json.dump(final_index, fh, sort_keys=True)
fh.write(";\n")


Expand Down

0 comments on commit 29f84e7

Please sign in to comment.