This documentation was generated with AI assistance and is still being audited. Some, or potentially a lot, of this information may be inaccurate. Learn more.
defregister_data_source(name:str,component_of:str|None=None,test_only:bool=False)->Callable[[type],type]:""" Decorator to register a data source and associate it with a capability. """defdecorator(cls:type)->type:cls._is_registered_data_source=True# type: ignore[attr-defined]cls._registered_name=name# type: ignore[attr-defined]cls._is_test_only=test_only# type: ignore[attr-defined]ifcomponent_of:cls._parent_capability=component_of# type: ignore[attr-defined]logger.debug(f"π Marked data source '{name}' for discovery",capability=component_of,test_only=test_only,)returnclsreturndecorator