-
Notifications
You must be signed in to change notification settings - Fork 43
Major Release #2672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Major Release #2672
Conversation
Opt may 2025
from randomizer.Prices import GetMaxForKong | ||
from randomizer.Patching.PuzzleRando import randomizeRaceRequirements | ||
from randomizer.Patching.Library.Generic import IsItemSelected, getBLockerThresholds, IsDDMSSelected | ||
from randomizer.Prices import GetMaxForKong, determineFinalPriceAssortment |
Check failure
Code scanning / CodeQL
Module-level cyclic import Error
randomizer.Settings
randomizer.Fill
definition
import
'Settings' may not be defined if module
randomizer.Settings
randomizer.Fill
definition
import
'Settings' may not be defined if module
randomizer.Settings
randomizer.Fill
definition
import
'Settings' may not be defined if module
randomizer.Settings
randomizer.Fill
definition
import
'Settings' may not be defined if module
randomizer.Settings
randomizer.Fill
definition
import
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 days ago
To fix the cyclic import, we should move the import of Settings
from the module level to within the function(s) or method(s) that actually use it. This ensures that the import only occurs when the function is called, at which point all modules should be fully initialized, thus breaking the cycle. Specifically, in randomizer/Fill.py
, we should remove the line from randomizer.Settings import Settings
from the top-level imports and instead add from randomizer.Settings import Settings
inside any function that uses Settings
. This change should be made only in the code shown, and only for the Settings
import.
-
Copy modified line R240
@@ -63,3 +63,2 @@ | ||
from randomizer.Prices import GetMaxForKong, determineFinalPriceAssortment | ||
from randomizer.Settings import Settings | ||
from randomizer.ShuffleBarrels import BarrelShuffle | ||
@@ -240,2 +239,3 @@ | ||
) -> Union[List[Sphere], List[Locations], bool, Set[Union[Locations, int]]]: | ||
from randomizer.Settings import Settings | ||
"""Search to find all reachable locations given owned items.""" |
small UT fix
Major Release