rasa/core/events/__init__.py
def resolve_by_type(
        type_name: Text,
        default: Optional[Type['Event']] = None
    ) -> Optional[Type['Event']]:
        """Returns a slots class by its type name."""
        from rasa.core import utils

        for cls in utils.all_subclasses(Event):
            if cls.type_name == type_name:
                return cls
        if type_name == "topic":
            return None  # backwards compatibility to support old TopicSet evts
        elif default is not None:
            return default
        else:
            raise ValueError("Unknown event name '{}'.".format(type_name))
Returns a slots class by its type name.
Returns a slots class by its type name.
Returns a slots class by its type name .
def resolve_by_type(
        type_name: Text,
        default: Optional[Type['Event']] = None
    ) -> Optional[Type['Event']]:
        from rasa.core import utils
        for cls in utils.all_subclasses(Event):
            if cls.type_name == type_name:
                return cls
        if type_name == "topic":
            return None  
        elif default is not None:
            return default
        else:
            raise ValueError("Unknown event name '{}'.".format(type_name))
def resolve_by_type ( type_name : Text , default : Optional [ Type [ 'Event' ] ] = None ) -> Optional [ Type [ 'Event' ] ] : from rasa . core import utils for cls in utils . all_subclasses ( Event ) : if cls . type_name == type_name : return cls if type_name == "topic" : return None elif default is not None : return default else : raise ValueError ( "Unknown event name '{}'." . format ( type_name ) )
Returns a slots class by its type name.
Returns a slots class by its type name .
"""Returns a slots class by its type name.""" # backwards compatibility to support old TopicSet evts
type_name
Text
default
Optional[Type['Event']]