Skip to content

Commit

Permalink
ofxget.collate_scan_results(): still trying to please mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
csingley committed Jun 4, 2020
1 parent 0258680 commit 560017b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ofxtools/scripts/ofxget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,10 @@ def collate_scan_results(
#
# Translation: just pick the longest sequence of successful
# formats and assume it applies for all versions.
formats_ = max(formats, key=len)
def sortKey(d):
return len(d)

formats_ = list(max(formats, key=sortKey))
formats_.sort(key=lambda f: (f["pretty"], f["unclosedelements"]))
return {"versions": sorted(versions), "formats": formats_}

Expand Down

0 comments on commit 560017b

Please sign in to comment.