diff --git a/backend/tasks/scheduled/update_launchbox_metadata.py b/backend/tasks/scheduled/update_launchbox_metadata.py index bdbb3b9f1..048e7e58b 100644 --- a/backend/tasks/scheduled/update_launchbox_metadata.py +++ b/backend/tasks/scheduled/update_launchbox_metadata.py @@ -143,10 +143,8 @@ class UpdateLaunchboxMetadataTask(RemoteFilePullTask): # Update initial progress update_stats.update(processed=processed_files, total=total_files) - # Every key below is stored the way lookups build it (stripped, - # and lowercased wherever the lookup lowercases). Storing the - # raw XML text instead would bury an entry behind whitespace - # nothing ever queries for. + # Keys are stored the way lookups build them: stripped, and + # lowercased wherever the lookup lowercases. for file in file_list: if file == "Platforms.xml": with z.open(file, "r") as f: diff --git a/backend/tests/tasks/test_update_launchbox_metadata.py b/backend/tests/tasks/test_update_launchbox_metadata.py index 0004c6101..a19b8b750 100644 --- a/backend/tests/tasks/test_update_launchbox_metadata.py +++ b/backend/tests/tasks/test_update_launchbox_metadata.py @@ -186,11 +186,9 @@ class TestUpdateLaunchboxMetadataTask: files_calls = [call for call in hset_calls if call[0][0] == LAUNCHBOX_FILES_KEY] assert len(files_calls) == 2 - # The fixture pads one entry per index the way a pretty-printed dump - # would. Keys have to come out normalized, or nothing would ever query - # them: lookups strip (and lowercase, where the index is lowercased). - # The Files key carries its platform too, since the same dump filename - # exists on several systems. + # The fixture pads one entry per index, as a pretty-printed dump does. + # Keys come out normalized, and the Files key carries its platform, + # since one dump filename exists on several systems. def fields(calls) -> set[str]: return {field for call in calls for field in call[1]["mapping"]}