From d594d5d4a7cf3b935ca1cc191fca88a719614cbf Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Mon, 22 Dec 2025 15:32:52 +0100 Subject: [PATCH] APQuest: Fix import shadowing issue (#5769) * Fix import shadowing issue * another comment --- worlds/apquest/world.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/worlds/apquest/world.py b/worlds/apquest/world.py index b38cb0913a..4e89efc35e 100644 --- a/worlds/apquest/world.py +++ b/worlds/apquest/world.py @@ -5,7 +5,8 @@ from typing import Any from worlds.AutoWorld import World # Imports of your world's files must be relative. -from . import items, locations, options, regions, rules, web_world +from . import items, locations, regions, rules, web_world +from . import options as apquest_options # rename due to a name conflict with World.options # APQuest will go through all the parts of the world api one step at a time, # with many examples and comments across multiple files. @@ -36,8 +37,9 @@ class APQuestWorld(World): web = web_world.APQuestWebWorld() # This is how we associate the options defined in our options.py with our world. - options_dataclass = options.APQuestOptions - options: options.APQuestOptions # Common mistake: This has to be a colon (:), not an equals sign (=). + # (Note: options.py has been imported as "apquest_options" at the top of this file to avoid a name conflict) + options_dataclass = apquest_options.APQuestOptions + options: apquest_options.APQuestOptions # Common mistake: This has to be a colon (:), not an equals sign (=). # Our world class must have a static location_name_to_id and item_name_to_id defined. # We define these in regions.py and items.py respectively, so we just set them here.