Spaces:
Sleeping
Sleeping
| from __future__ import annotations | |
| from importlib import import_module | |
| from typing import Any | |
| __all__ = [ | |
| "Action", | |
| "ActionLike", | |
| "ApplyForexAdjustment", | |
| "Client", | |
| "EnterpriseFinanceActionPayload", | |
| "EnterpriseFinanceClient", | |
| "EnterpriseFinanceObservation", | |
| "EnterpriseFinanceState", | |
| "LinkTransactions", | |
| "Observation", | |
| "PostEliminationEntry", | |
| "QuerySubledger", | |
| ] | |
| def __getattr__(name: str) -> Any: | |
| if name in { | |
| "Action", | |
| "ActionLike", | |
| "ApplyForexAdjustment", | |
| "EnterpriseFinanceActionPayload", | |
| "EnterpriseFinanceObservation", | |
| "EnterpriseFinanceState", | |
| "LinkTransactions", | |
| "Observation", | |
| "PostEliminationEntry", | |
| "QuerySubledger", | |
| }: | |
| models = import_module("enterprise_finance_env.models") | |
| if name == "Action": | |
| return getattr(models, "EnterpriseFinanceActionPayload") | |
| if name == "Observation": | |
| return getattr(models, "EnterpriseFinanceObservation") | |
| return getattr(models, name) | |
| if name in {"Client", "EnterpriseFinanceClient"}: | |
| client = import_module("enterprise_finance_env.client") | |
| if name == "Client": | |
| return getattr(client, "EnterpriseFinanceClient") | |
| return getattr(client, name) | |
| raise AttributeError(f"module 'enterprise_finance_env' has no attribute {name!r}") | |