@@ -19,13 +19,13 @@ def create(
1919 data : typing .Optional [typing .Any ],
2020 ) -> "AnyCloudEvent" :
2121 """
22- Creates a new instance of the CloudEvent using supplied `attributes`
22+ Creates a new instance of the CloudEvent using supplied `attributes`
2323 and `data`.
24-
24+
2525 This method should be preferably used over the constructor to create events
2626 while custom framework-specific implementations may require or assume
2727 different arguments.
28-
28+
2929 :param attributes: The attributes of the CloudEvent instance.
3030 :param data: The payload of the CloudEvent instance.
3131 :returns: A new instance of the CloudEvent created from the passed arguments.
@@ -36,12 +36,12 @@ def create(
3636 def _get_attributes (self ) -> typing .Dict [str , typing .Any ]:
3737 """
3838 Returns the attributes of the event.
39-
39+
4040 The implementation MUST assume that the returned value MAY be mutated.
41-
42- Having a function over a property simplifies integration for custom
41+
42+ Having a function over a property simplifies integration for custom
4343 framework-specific implementations.
44-
44+
4545 :returns: Attributes of the event.
4646 """
4747 raise NotImplementedError ()
@@ -70,10 +70,10 @@ def __eq__(self, other: typing.Any) -> bool:
7070 def __getitem__ (self , key : str ) -> typing .Any :
7171 """
7272 Returns a value of an attribute of the event denoted by the given `key`.
73-
73+
7474 The `data` of the event should be accessed by the `.data` accessor rather
7575 than this mapping.
76-
76+
7777 :param key: The name of the event attribute to retrieve the value for.
7878 :returns: The event attribute value.
7979 """
@@ -84,10 +84,10 @@ def get(
8484 ) -> typing .Optional [typing .Any ]:
8585 """
8686 Retrieves an event attribute value for the given `key`.
87-
87+
8888 Returns the `default` value if the attribute for the given key does not exist.
8989
90- The implementation MUST NOT throw an error when the key does not exist, but
90+ The implementation MUST NOT throw an error when the key does not exist, but
9191 rather should return `None` or the configured `default`.
9292
9393 :param key: The name of the event attribute to retrieve the value for.
@@ -111,7 +111,7 @@ def __len__(self) -> int:
111111
112112 def __contains__ (self , key : str ) -> bool :
113113 """
114- Determines if an attribute with a given `key` is present
114+ Determines if an attribute with a given `key` is present
115115 in the event attributes.
116116 """
117117 return key in self ._get_attributes ()
0 commit comments