forked from Imagelibrary/littlefs
scripts: ctx.py: Only sort children layers if explicitly requested
- Sorting struct fields by name? Eh, that's not a big deal. - Sorting function params by name? Okay, that's really annoying. This compromises by sorting only the top-level results by name, and leaving recursive results in the order returned by collect by default. Recursive results should usually have a well-defined order. This should be extendable to the other result scripts as well.
This commit is contained in:
@@ -923,8 +923,7 @@ def table(Result, results, diff_results=None, *,
|
||||
for r in results_}
|
||||
names_ = list(table_.keys())
|
||||
|
||||
# sort the children layer
|
||||
names_.sort()
|
||||
# only sort the children layer if explicitly requested
|
||||
if sort:
|
||||
for k, reverse in reversed(sort):
|
||||
names_.sort(
|
||||
|
||||
Reference in New Issue
Block a user