def validate(cls): try: return interfaces.implement(interface)(cls) except (interfaces.MissingRequiredAttribute, interfaces.MissingRequiredClassMethod) as exc: error_string = "Error in class `{}`: {}".format(cls.__name__, exc) raise exception(error_string)
def validate(cls): try: return interfaces.implement(interface)(cls) except ( interfaces.MissingRequiredAttribute, interfaces.MissingRequiredClassMethod ) as exc: error_string = "Error in class `{}`: {}".format(cls.__name__, exc) raise exception(error_string)
def redobject(cls): """Decorator for implementing redhot objects.""" return interfaces.implement(_RedObject)(cls)