config
dev_tool.event.handler.config
log = logging.getLogger(__name__)
module-attribute
ConfigEventHandler
A handler class for configuration change events.
This class manages callbacks for configuration changes and executes them when corresponding events are received.
The constructor for the ConfigEventHandler class.
Initializes empty callback lists for each configuration event type.
Source code in dev_tool/event/handler/config.py
handle
A method that handles configuration change events.
Parameters:
-
event(Event) –The event object to handle.
Source code in dev_tool/event/handler/config.py
register_callback
A method that registers a callback for a configuration event.
Parameters:
-
event_type(AppEventType) –The event type to listen for.
-
callback(Callable[[], None]) –The callback function to execute.
Source code in dev_tool/event/handler/config.py
unregister_callback
A method that unregisters a callback for a configuration event.
Parameters:
-
event_type(AppEventType) –The event type to stop listening for.
-
callback(Callable[[], None]) –The callback function to remove.
Source code in dev_tool/event/handler/config.py
get_event_type
staticmethod
A method that returns the event types this handler processes.
Returns:
-
list[AppEventType]–A list of event types.