@@ -72,7 +72,8 @@ def __init__(
7272 self .name = name
7373 self .description = description
7474 self .url = url
75- # Note: relationships should always match get_efferent_relationships() - i.e. outbound relationships only
75+ # Note: relationships should always match get_efferent_relationships() - i.e.
76+ # outbound relationships only
7677 self .relationships : Iterable [Relationship ] = set (relationships )
7778
7879 self .tags .add (Tags .ELEMENT )
@@ -108,9 +109,10 @@ def add_relationship(
108109 ) -> Relationship :
109110 """Add a new relationship from this element to another.
110111
111- This can be used either to add a `Relationship` instance that has already been constructed,
112- or by passing the arguments (e.g. description, destination) with which to construct a new
113- one. The relationship will automatically be registered with the element's model.
112+ This can be used either to add a `Relationship` instance that has already been
113+ constructed, or by passing the arguments (e.g. description, destination) with
114+ which to construct a new one. The relationship will automatically be
115+ registered with the element's model.
114116 """
115117 if relationship is None :
116118 relationship = Relationship (** kwargs )
@@ -120,7 +122,8 @@ def add_relationship(
120122 relationship .source = self
121123 elif relationship .source is not self :
122124 raise ValueError (
123- f"Cannot add relationship { relationship } to element { self } that is not its source."
125+ f"Cannot add relationship { relationship } to element { self } that is "
126+ f"not its source."
124127 )
125128 self .relationships .add (relationship )
126129 self .model .add_relationship (
@@ -130,6 +133,7 @@ def add_relationship(
130133
131134 @classmethod
132135 def hydrate_arguments (cls , element_io : ElementIO ) -> dict :
136+ """Hydrate an ElementIO into the constructor arguments for Element."""
133137 return {
134138 ** super ().hydrate_arguments (element_io ),
135139 "name" : element_io .name ,
0 commit comments