Skip to content
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

fixed potential circular imports in formats #182

Merged

Conversation

steven11sjf
Copy link
Contributor

  • replaced "from mercury_engine_data_structures.formats import BaseResource" with "from mercury_engine_data_structures.formats.base_resource import BaseResource"
  • replace "from mercury_engine_data_structures.formats import standard_format" with "from mercury_engine_data_structures.formats.standard_format import <create | game_model> and updated code to remove "standard_format." prefix

Copy link

codecov bot commented Jul 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.62%. Comparing base (2bff8bc) to head (74908b3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #182      +/-   ##
==========================================
+ Coverage   74.53%   74.62%   +0.09%     
==========================================
  Files          65       65              
  Lines        3255     3267      +12     
==========================================
+ Hits         2426     2438      +12     
  Misses        829      829              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

from mercury_engine_data_structures.game_check import Game

BMBLS = standard_format.create('base::animation::CBlendSpaceResource', 0x02020001)
BMBLS = create('base::animation::CBlendSpaceResource', 0x02020001)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to import the module instead of a function from the module. And this change makes no difference for loops.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, I reverted that change. surprised that worked since I thought the circular import issue was from calling from mercury_engine_data_structures.formats import XYZ

- replaced "from m_e_d_s.formats import BaseResource" with "from
  m_e_d_s.formats.base_resource import BaseResource"
@henriquegemignani henriquegemignani added this pull request to the merge queue Jul 15, 2024
Merged via the queue into randovania:main with commit 0d6a945 Jul 15, 2024
10 checks passed
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.

2 participants