napari.utils.notifications.WarningNotification#

class napari.utils.notifications.WarningNotification(warning: Warning, filename=None, lineno=None, *args, **kwargs)[source]#

Bases: Notification

Notification at a Warning severity level.

Methods

from_exception(exc, **kwargs)

from_warning(warning, **kwargs)

Attributes

blocked

This boolean property indicates whether the event will be delivered to event callbacks.

handled

This boolean property indicates whether the event has already been acted on by an event handler.

message

native

source

The object that the event applies to (i.e. the source of the event).

sources

List of objects that the event applies to (i.e. are or have been a source of the event).

type

Details

property blocked: bool#

This boolean property indicates whether the event will be delivered to event callbacks. If it is set to True, then no further callbacks will receive the event. When possible, it is recommended to use Event.handled rather than Event.blocked.

property handled: bool#

This boolean property indicates whether the event has already been acted on by an event handler. Since many handlers may have access to the same events, it is recommended that each check whether the event has already been handled as well as set handled=True if it decides to act on the event.

property source: Any#

The object that the event applies to (i.e. the source of the event).

property sources: List[Any]#

List of objects that the event applies to (i.e. are or have been a source of the event). Can contain multiple objects in case the event traverses a hierarchy of objects.