Files
wehub-resource-sync 1443d3fdf9
Ruff Format Check / Ruff Format & Lint (push) Failing after 7m39s
Deploy VitePress site to Pages / build (push) Failing after 9m11s
Deploy VitePress site to Pages / Deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:32:26 +08:00

34 lines
790 B
Python

from dotenv import load_dotenv
load_dotenv(".env", override=True)
from concurrent.futures import ThreadPoolExecutor # noqa: E402
from importlib import import_module # noqa: E402
from yuxi.config import config as config # noqa: E402
try:
from importlib.metadata import version
__version__ = version("yuxi")
except Exception:
__version__ = "unknown"
executor = ThreadPoolExecutor() # noqa: E402
def get_version():
"""Return the Yuxi version."""
return __version__
def __getattr__(name: str):
if name == "knowledge_base":
knowledge = import_module("yuxi.knowledge")
return getattr(knowledge, name)
raise AttributeError(f"module 'yuxi' has no attribute {name!r}")
def __dir__():
return sorted(set(globals()) | {"knowledge_base"})