diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2019-08-19 10:21:25 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2019-08-19 10:21:25 +0200 |
commit | 1f2bf08018de022890025618094326bd6556997d (patch) | |
tree | 21b50f25e3f3fe261a6bf17e5fcd9d205b198c14 /src/ee/digikey | |
parent | 5f12ee84322731ce9b846a27852999ff219c75b5 (diff) | |
download | ee-python-1f2bf08018de022890025618094326bd6556997d.tar.gz ee-python-1f2bf08018de022890025618094326bd6556997d.tar.bz2 ee-python-1f2bf08018de022890025618094326bd6556997d.tar.xz ee-python-1f2bf08018de022890025618094326bd6556997d.zip |
digikey-search-parts: Sorting summary statistics so the output is
consistent.
Diffstat (limited to 'src/ee/digikey')
-rw-r--r-- | src/ee/digikey/search_parts.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |