Exemple #1
0
 def to_oef_attribute(cls, attribute: Attribute) -> OEFAttribute:
     """From our attribute to OEF attribute."""
     return OEFAttribute(
         attribute.name, attribute.type, attribute.is_required, attribute.description
     )
 def to_oef_attribute(cls, attribute: Attribute) -> OEFAttribute:
     """From our attribute to OEF attribute."""
     # in case the attribute type is Location, replace with the `oef` class.
     attribute_type = OEFLocation if attribute.type == Location else attribute.type
     return OEFAttribute(attribute.name, attribute_type,
                         attribute.is_required, attribute.description)