diff --git a/cloudevents/abstract/event.py b/cloudevents/abstract/event.py index 77a099d..98143d5 100644 --- a/cloudevents/abstract/event.py +++ b/cloudevents/abstract/event.py @@ -68,9 +68,22 @@ class CloudEvent(abc.ABC): pass def __setitem__(self, key: str, value: typing.Any) -> None: + """ + :param key: Event attribute name to change the value of. + :param value: The new event attribute value + """ + # requiring the user to implement the setting of the value because the read + # model is READ-ONLY. + # The abstract class SHOULD NOT know how is the concrete class is implemented raise NotImplementedError() def __delitem__(self, key: str) -> None: + """ + :param key: Event attribute name to delete the value of. + """ + # requiring the user to implement the deletion of the value because the read + # model is READ-ONLY. + # The abstract class SHOULD NOT know how is the concrete class is implemented raise NotImplementedError() def __eq__(self, other: typing.Any) -> bool: