Skip to content

Commit

Permalink
COMP: Ensure consistent ordering of list printed
Browse files Browse the repository at this point in the history
By alphabetically sorting the list, the file written has a more
deterministic format that facilitated debugging.
  • Loading branch information
hjmjohnson committed Oct 14, 2020
1 parent cf1095c commit 362bf6b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Wrapping/Generators/SwigInterface/igenerator.py
Expand Up @@ -1257,6 +1257,11 @@ def generate_swig_input(moduleName):
)
with open(config_file, "a") as ff:
ff.write("snake_case_functions = (")
for function in snake_case_process_object_functions:
# Ensure that the functions are sorted alphabetically to ensure consistency
# in the generated file structure.
sorted_snake_case_process_object_functions = sorted(
snake_case_process_object_functions
)
for function in sorted_snake_case_process_object_functions:
ff.write("'" + function + "', ")
ff.write(")\n")

0 comments on commit 362bf6b

Please sign in to comment.