wijjit.core.events.Event

class wijjit.core.events.Event(event_type=None, timestamp=<factory>, cancelled=False)[source]

Base event class.

All specific event types inherit from this base class.

Parameters:
  • event_type (EventType or None) – The type of event (set automatically by subclasses)

  • timestamp (datetime) – When the event occurred

  • cancelled (bool) – Whether the event has been cancelled

Variables:
  • event_type (EventType or None) – The type of event

  • timestamp (datetime) – When the event occurred

  • cancelled (bool) – Whether the event has been cancelled

__init__(event_type=None, timestamp=<factory>, cancelled=False)
Parameters:
Return type:

None

Methods

__init__([event_type, timestamp, cancelled])

cancel()

Cancel the event.

Attributes

cancelled

event_type

timestamp

event_type: EventType | None = None
timestamp: datetime
cancelled: bool = False
cancel()[source]

Cancel the event.

Cancelled events will not propagate to subsequent handlers.

Return type:

None