From c347c9aee8fe68832a3365550ad31a549132b05f Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 10 Feb 2020 18:50:27 +1000 Subject: [PATCH] sort media list --- qt/aqt/media.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qt/aqt/media.py b/qt/aqt/media.py index c7f5faa4a..a9d65a736 100644 --- a/qt/aqt/media.py +++ b/qt/aqt/media.py @@ -106,18 +106,18 @@ def describe_output(output: MediaCheckOutput) -> str: buf.append(_("Some files have been renamed for compatibility:")) buf.extend( _("Renamed: %(old)s -> %(new)s") % dict(old=k, new=v) - for (k, v) in output.renamed.items() + for (k, v) in sorted(output.renamed.items()) ) buf.append("") if output.oversize: buf.append(_("Files over 100MB can not be synced with AnkiWeb.")) - buf.extend(_("Over 100MB: {}").format(f) for f in output.oversize) + buf.extend(_("Over 100MB: {}").format(f) for f in sorted(output.oversize)) buf.append("") if output.dirs: buf.append(_("Folders inside the media folder are not supported.")) - buf.extend(_("Folder: {}").format(f) for f in output.dirs) + buf.extend(_("Folder: {}").format(f) for f in sorted(output.dirs)) buf.append("") if output.missing: @@ -126,7 +126,7 @@ def describe_output(output: MediaCheckOutput) -> str: "The following files are referenced by cards, but were not found in the media folder:" ) ) - buf.extend(_("Missing: {}").format(f) for f in output.missing) + buf.extend(_("Missing: {}").format(f) for f in sorted(output.missing)) buf.append("") if output.unused: @@ -135,7 +135,7 @@ def describe_output(output: MediaCheckOutput) -> str: "The following files were found in the media folder, but do not appear to be used on any cards:" ) ) - buf.extend(_("Unused: {}").format(f) for f in output.unused) + buf.extend(_("Unused: {}").format(f) for f in sorted(output.unused)) buf.append("") return "\n".join(buf)