Module nari.types.event.status

Classes for status events

Expand source code
"""Classes for status events"""
from nari.types import Timestamp
from nari.types.event import Event
from nari.types.actor import Actor
from nari.types.status import Status


class StatusApply(Event): # pylint: disable=too-few-public-methods
    """Represents the application of a status"""
    def __init__(self, *,
                 timestamp: Timestamp,
                 status: Status,
                 duration: float,
                 source_actor: Actor,
                 target_actor: Actor,
                 params: int,
                ):
        super().__init__(timestamp)
        self.status = status
        self.duration = duration
        self.source_actor = source_actor
        self.target_actor = target_actor
        self.params = params

    def __repr__(self):
        return '<StatusApply>'


class StatusRemove(Event): # pylint: disable=too-few-public-methods
    """Represents the removal of a status"""
    def __init__(self, *,
                 timestamp: Timestamp,
                 status: Status,
                 duration: float,
                 source_actor: Actor,
                 target_actor: Actor,
                 params: int,
                ):
        super().__init__(timestamp)
        self.status = status
        self.duration = duration
        self.source_actor = source_actor
        self.target_actor = target_actor
        self.params = params

    def __repr__(self):
        return '<StatusRemove>'

Classes

class StatusApply (*, timestamp: int, status: Status, duration: float, source_actor: Actor, target_actor: Actor, params: int)

Represents the application of a status

Expand source code
class StatusApply(Event): # pylint: disable=too-few-public-methods
    """Represents the application of a status"""
    def __init__(self, *,
                 timestamp: Timestamp,
                 status: Status,
                 duration: float,
                 source_actor: Actor,
                 target_actor: Actor,
                 params: int,
                ):
        super().__init__(timestamp)
        self.status = status
        self.duration = duration
        self.source_actor = source_actor
        self.target_actor = target_actor
        self.params = params

    def __repr__(self):
        return '<StatusApply>'

Ancestors

class StatusRemove (*, timestamp: int, status: Status, duration: float, source_actor: Actor, target_actor: Actor, params: int)

Represents the removal of a status

Expand source code
class StatusRemove(Event): # pylint: disable=too-few-public-methods
    """Represents the removal of a status"""
    def __init__(self, *,
                 timestamp: Timestamp,
                 status: Status,
                 duration: float,
                 source_actor: Actor,
                 target_actor: Actor,
                 params: int,
                ):
        super().__init__(timestamp)
        self.status = status
        self.duration = duration
        self.source_actor = source_actor
        self.target_actor = target_actor
        self.params = params

    def __repr__(self):
        return '<StatusRemove>'

Ancestors