fix: Use lazy import for create_app in __init__.py
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Successful in 3s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Failing after 2s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 2s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Successful in 1s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Deploy to Testnet / deploy-testnet (push) Successful in 1m9s
Deploy to Testnet / notify-deployment (push) Has been cancelled
Integration Tests / test-service-integration (push) Successful in 2m32s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 1s
Python Tests / test-python (push) Successful in 7s
Security Scanning / security-scan (push) Successful in 23s

- Change create_app to lazy import to avoid fastapi dependency
- Allows importing from aitbc_chain.cross_chain without triggering fastapi import
- Fixes cross-chain tests with minimal dependencies (pytest pytest-asyncio)
This commit is contained in:
aitbc
2026-04-29 20:38:48 +02:00
parent 67aa8a63e6
commit c1e9ee3301

View File

@@ -1,5 +1,8 @@
"""AITBC blockchain node package."""
from .app import create_app
# Lazy import to avoid cascading dependencies
def create_app():
from .app import create_app as _create_app
return _create_app()
__all__ = ["create_app"]