Skip to content

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

Merged
merged 320 commits into from
Aug 11, 2025
Merged

Major Release #2672

merged 320 commits into from
Aug 11, 2025

Conversation

theballaam96
Copy link
Collaborator

@theballaam96 theballaam96 commented Jul 26, 2025

Major Release

@theballaam96 theballaam96 changed the title 5.0 dev Major Release Aug 10, 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

'Settings' may not be defined if module
randomizer.Settings
is imported before module
randomizer.Fill
, as the
definition
of Settings occurs after the cyclic
import
of randomizer.Fill.
'Settings' may not be defined if module
randomizer.Settings
is imported before module
randomizer.Fill
, as the
definition
of Settings occurs after the cyclic
import
of randomizer.Fill.
'Settings' may not be defined if module
randomizer.Settings
is imported before module
randomizer.Fill
, as the
definition
of Settings occurs after the cyclic
import
of randomizer.Fill.
'Settings' may not be defined if module
randomizer.Settings
is imported before module
randomizer.Fill
, as the
definition
of Settings occurs after the cyclic
import
of randomizer.Fill.
'Settings' may not be defined if module
randomizer.Settings
is imported before module
randomizer.Fill
, as the
definition
of Settings occurs after the cyclic
import
of randomizer.Fill.

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.


Suggested changeset 1
randomizer/Fill.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/randomizer/Fill.py b/randomizer/Fill.py
--- a/randomizer/Fill.py
+++ b/randomizer/Fill.py
@@ -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."""
EOF
@@ -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."""
Copilot is powered by AI and may make mistakes. Always verify output.
@theballaam96 theballaam96 marked this pull request as ready for review August 11, 2025 13:32
@theballaam96 theballaam96 merged commit a5ed7c9 into dev Aug 11, 2025
4 of 5 checks passed
@theballaam96 theballaam96 deleted the 5.0-dev branch August 11, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants