simplebench.type_proxies.lazy_type_proxy module🔗
Provides a generic deferred import mechanism for any type.
- class simplebench.type_proxies.lazy_type_proxy.LazyTypeProxy[source]🔗
Bases:
Generic[T]A generic base class for creating lazy-loading type proxies.
Usage:
class MyProxy(LazyTypeProxy['RealType']): pass register_lazy_proxy(MyProxy, 'RealType', 'path.to.module')
- simplebench.type_proxies.lazy_type_proxy.register_lazy_proxy( ) None[source]🔗
Register a lazy proxy class with its real type information.
The proxy class will use this information to perform runtime type checks without causing circular import issues.
Usage:
register_lazy_proxy(MyProxyClass, 'RealTypeName', 'path.to.module')