mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
- 更新 .env.example 环境变量示例 - 更新 pyproject.toml 依赖配置 - 删除 tui 相关命令 (cmd_tui.py, cmd_run_tui.py) - 更新 CLI i18n 和核心模块 - 删除 tombi.toml
30 lines
561 B
Python
30 lines
561 B
Python
from __future__ import annotations
|
|
|
|
import sys
|
|
from typing import TYPE_CHECKING, Any
|
|
|
|
if TYPE_CHECKING:
|
|
from .core import logger as logger
|
|
|
|
__all__ = ["logger"]
|
|
|
|
|
|
def __getattr__(name: str) -> Any:
|
|
if name == "cli":
|
|
from .cli.__main__ import cli
|
|
|
|
return cli()
|
|
if name == "cli_rs":
|
|
from .rust._core import cli
|
|
|
|
def cli_rs_wrapper() -> None:
|
|
return cli(sys.argv)
|
|
|
|
return cli_rs_wrapper
|
|
|
|
if name == "logger":
|
|
from .core import logger
|
|
|
|
return logger
|
|
raise AttributeError(name)
|