APQuest: Fix import shadowing issue (#5769)

* Fix import shadowing issue

* another comment
This commit is contained in:
NewSoupVi
2025-12-22 15:32:52 +01:00
committed by GitHub
parent e950a2fa58
commit d594d5d4a7

View File

@@ -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.