Skip to content

fix: resolve circular import by importing EthereumAddress from app.model.type - #1694

Merged
YoshihitoAso merged 1 commit into
dev-25.12from
fix/#1693
Nov 17, 2025
Merged

fix: resolve circular import by importing EthereumAddress from app.model.type#1694
YoshihitoAso merged 1 commit into
dev-25.12from
fix/#1693

Conversation

@purplesmoke05

Copy link
Copy Markdown
Member

📌 Description

This pull request refactors the codebase to move the definition and import of the EthereumAddress type from app.model.schema.base to app.model.type. This change improves code organization by separating type definitions from schema definitions and ensures more consistent usage of the EthereumAddress type across the project.

✅ Related Issues

🔄 Changes

Refactoring: Type Definition and Imports

  • Replaced all imports of EthereumAddress from app.model.schema.base with imports from app.model.type or app.model.type.base in various API router and schema files, including company_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, and node_info.py. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]

  • Removed the definition of EthereumAddress from app/model/schema/base/base.py and its re-export from app/model/schema/base/__init__.py, centralizing its definition in the type module. [1] [2] [3]

Code Organization

  • Updated references in schema files to import EthereumAddress from 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

  • I have added tests where necessary.
  • I have updated the documentation where necessary.

@github-actions

Copy link
Copy Markdown

Coverage

Coverage Report •
FileStmtsMissCoverMissing
app/api/routers
   company_info.py96594%158–159, 288, 308, 326
   dex_order_list.py1841293%180–181, 284, 303–304, 542, 637–638, 725–726, 804–805
   e2e_message.py200100% 
   eth.py2453984%129–130, 197–199, 213–216, 218, 272–273, 275–278, 311–312, 315–316, 403–405, 419–422, 424, 478–479, 548–552, 554–557
   events.py1891791%163–164, 172, 174, 176, 178, 248–249, 258, 345–346, 349, 363, 365, 367, 440–441
   position.py4014090%441, 448, 495–496, 519–524, 582–583, 610–611, 642–647, 687–688, 715–716, 747–752, 981–982, 1009–1010, 1051–1056
   position_lock.py1390100% 
   token.py451499%592, 723, 737, 741
   token_bond.py142795%326–331, 334
   token_coupon.py142795%308–313, 316
   token_membership.py142795%312–317, 320
   token_share.py142795%324–329, 332
app/model/schema
   admin.py320100% 
   bc_explorer.py700100% 
   company_info.py360100% 
   dex_market.py560100% 
   dex_order_list.py420100% 
   node_info.py230100% 
   notification.py650100% 
   position.py1300100% 
   public_info.py480100% 
   token.py2110100% 
   token_bond.py460100% 
   token_coupon.py370100% 
   token_lock.py300100% 
   token_membership.py370100% 
   token_share.py450100% 
   user_info.py280100% 
app/model/schema/base
   __init__.py10100% 
   base.py174497%198, 204–206
app/model/type
   __init__.py30100% 
   base.py40100% 
   company_list.py240100% 
   token_list.py16193%41
TOTAL45571159096% 

Tests Skipped Failures Errors Time
1529 0 💤 0 ❌ 0 🔥 12m 43s ⏱️

@YoshihitoAso
YoshihitoAso merged commit 9c9be56 into dev-25.12 Nov 17, 2025
12 checks passed
@YoshihitoAso
YoshihitoAso deleted the fix/#1693 branch November 17, 2025 10:00
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