Skip to content

Commit e4fd064

Browse files
authored
Core: don't use union type just to reuse a name (ArchipelagoMW#5246)
This is the "followup PR" to address these comments: ArchipelagoMW#5071 (comment) It's better to have a different name for different representations of the data, so that someone reading the code doesn't need to wonder whether it has gone through the transformation or not.
1 parent dba03e3 commit e4fd064

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def precollect_hint(location: Location, auto_status: HintStatus):
326326
if current_sphere:
327327
spheres.append(dict(current_sphere))
328328

329-
multidata: NetUtils.MultiData | bytes = {
329+
multidata: NetUtils.MultiData = {
330330
"slot_data": slot_data,
331331
"slot_info": slot_info,
332332
"connect_names": {name: (0, player) for player, name in multiworld.player_name.items()},
@@ -350,11 +350,11 @@ def precollect_hint(location: Location, auto_status: HintStatus):
350350
for key in ("slot_data", "er_hint_data"):
351351
multidata[key] = convert_to_base_types(multidata[key])
352352

353-
multidata = zlib.compress(restricted_dumps(multidata), 9)
353+
serialized_multidata = zlib.compress(restricted_dumps(multidata), 9)
354354

355355
with open(os.path.join(temp_dir, f'{outfilebase}.archipelago'), 'wb') as f:
356356
f.write(bytes([3])) # version of format
357-
f.write(multidata)
357+
f.write(serialized_multidata)
358358

359359
output_file_futures.append(pool.submit(write_multidata))
360360
if not check_accessibility_task.result():

0 commit comments

Comments
 (0)