From 2067df55d3db3ea9167cccef5a18193df6400f42 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Wed, 6 Oct 2021 19:21:41 +0200 Subject: [PATCH] use natural sorting --- slic/utils/printing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slic/utils/printing.py b/slic/utils/printing.py index d7171a204..8d566bfd9 100644 --- a/slic/utils/printing.py +++ b/slic/utils/printing.py @@ -1,4 +1,5 @@ import string +from .utils import sorted_naturally def printable_dict_of_dicts(d): @@ -8,7 +9,7 @@ def printable_dict_of_dicts(d): def printable_dict(d, header=None): length = maxstrlen(d) + 1 - lines = sorted("{}:{}{}".format(k, " "*(length-strlen(k)), v) for k, v in d.items()) + lines = sorted_naturally("{}:{}{}".format(k, " "*(length-strlen(k)), v) for k, v in d.items()) if header: header = format_header(header)