Spaces:
Sleeping
Sleeping
File size: 1,405 Bytes
4ccc966 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | 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}")
|