Coverage for src / lexigram / admin / tasks / __init__.py: 0%
14 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-08-11 02:25 +0800
« prev ^ index » next coverage.py v7.13.5, created at 2026-08-11 02:25 +0800
1"""Background tasks for Lexigram Admin.
3PEP 562 lazy loading to avoid import-time dependency issues.
4"""
6from __future__ import annotations
8import importlib
9from typing import TYPE_CHECKING, Any
11if TYPE_CHECKING:
12 from lexigram.admin.tasks.bulk_operations import (
13 AdminTaskResult,
14 AdminTaskType,
15 TaskProgress,
16 )
18_EXPORTS = {
19 "AdminTaskType": ".bulk_operations",
20 "TaskProgress": ".bulk_operations",
21 "AdminTaskResult": ".bulk_operations",
22}
24__all__ = list(_EXPORTS.keys())
27def __getattr__(name: str) -> Any:
28 if name in _EXPORTS:
29 module = importlib.import_module(_EXPORTS[name], __package__)
30 value = getattr(module, name)
31 globals()[name] = value
32 return value
33 raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
36def __dir__() -> Any:
37 return __all__