Common: Add defaults for each argument in AbstractEvent

This commit is contained in:
Ilija Lazoroski 2022-08-16 17:30:30 +02:00
parent b3d37d9223
commit 205ff84b31
1 changed files with 4 additions and 4 deletions

View File

@ -16,13 +16,13 @@ class AbstractEvent(ABC):
about the event.
Attributes:
:param tags: The set of tags associated with the event
:param target: The target of the event (if not the local system)
:param source: The UUID of the agent that observed the event
:param target: The target of the event (if not the local system)
:param timestamp: The time that the event occurred (seconds since the Unix epoch)
:param tags: The set of tags associated with the event
"""
tags: FrozenSet[str]
target: Union[UUID, IPv4Address, None]
source: UUID = field(default_factory=getnode)
target: Union[UUID, IPv4Address, None] = field(default=None)
timestamp: float = field(default_factory=time.time)
tags: FrozenSet[str] = field(default_factory=frozenset)