fix: resolve circular import by importing EthereumAddress from app.model.type - #1694
Merged
Conversation
YoshihitoAso
approved these changes
Nov 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Description
This pull request refactors the codebase to move the definition and import of the
EthereumAddresstype fromapp.model.schema.basetoapp.model.type. This change improves code organization by separating type definitions from schema definitions and ensures more consistent usage of theEthereumAddresstype across the project.✅ Related Issues
🔄 Changes
Refactoring: Type Definition and Imports
Replaced all imports of
EthereumAddressfromapp.model.schema.basewith imports fromapp.model.typeorapp.model.type.basein various API router and schema files, includingcompany_info.py,dex_order_list.py,e2e_message.py,eth.py,events.py,position.py,position_lock.py,token.py,token_bond.py,token_coupon.py,token_membership.py,token_share.py,admin.py,bc_explorer.py,company_info.py,dex_market.py,dex_order_list.py, andnode_info.py. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]Removed the definition of
EthereumAddressfromapp/model/schema/base/base.pyand its re-export fromapp/model/schema/base/__init__.py, centralizing its definition in the type module. [1] [2] [3]Code Organization
EthereumAddressfrom the new location, ensuring type consistency and improving code maintainability. [1] [2] [3] [4] [5] [6]This refactor does not change any runtime behavior but improves the clarity and maintainability of the codebase.
📌 Checklist