From 1f2bf08018de022890025618094326bd6556997d Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 19 Aug 2019 10:21:25 +0200 Subject: digikey-search-parts: Sorting summary statistics so the output is consistent. --- src/ee/digikey/search_parts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ee') diff --git a/src/ee/digikey/search_parts.py b/src/ee/digikey/search_parts.py index 703e65f..144b254 100644 --- a/src/ee/digikey/search_parts.py +++ b/src/ee/digikey/search_parts.py @@ -262,7 +262,7 @@ def run_search_parts(in_path: Path, out_path: Path, log, cache_dir: Path, store_ for name, results in [("MPN", mpn_results), ("SPN", spn_results)]: print("{} Searches:\n".format(name), file=log) - for res, count in results.items(): + for res, count in sorted([(res, count) for res, count in results.items()], key=lambda x: x[0].value): print("* {}: {}".format(res.name, count), file=log) print("", file=log) -- cgit v1.2.3