Files
aitbc/cli/aitbc_cli/__init__.py
aitbc 7ced360c1f
Some checks failed
CLI Tests / test-cli (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
refactor: move cli/core/ to cli/aitbc_cli/core/ for proper package structure
- Moved core/ directory to aitbc_cli/core/ to make it a proper subpackage
- Updated aitbc_cli.py to load from new path
- Simplified aitbc_cli/__init__.py to use normal import instead of spec_from_file_location
- Updated all core imports to use aitbc_cli.core prefix
- Copied utils files (wallet_daemon_client, error_handling, crypto_utils, subprocess) to aitbc_cli/utils/
- Fixed wallet list command to work with new structure
- This fixes ModuleNotFoundError for aitbc_cli.core submodules
2026-05-26 12:17:58 +02:00

35 lines
1.2 KiB
Python

"""AITBC CLI package compatibility surface."""
from __future__ import annotations
from importlib import import_module
import sys
__version__ = "0.1.0"
__author__ = "AITBC Team"
__email__ = "andreas.fleckl@bubuit.net"
# Provide compatibility aliases for source-tree imports used by modular commands.
# Note: core and models are sibling directories, not subpackages of aitbc_cli
# These compatibility aliases are disabled to prevent sys.modules corruption
# if "aitbc_cli.core" not in sys.modules:
# sys.modules["aitbc_cli.core"] = import_module("aitbc_cli.core")
# if "aitbc_cli.models" not in sys.modules:
# sys.modules["aitbc_cli.models"] = import_module("aitbc_cli.models")
# Note: aitbc_cli.config is imported normally to avoid circular import issues
__all__ = ["cli", "main"]
def __getattr__(name: str):
"""Lazily expose the modular CLI entrypoints."""
if name not in __all__:
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
# core/ is now a proper subpackage of aitbc_cli/, so we can import normally
from aitbc_cli.core.main import main, cli
value = cli if name == "cli" else main
globals()[name] = value
return value