rasa/core/utils.py
def float_arg(request: Request,
              key: Text,
              default: Optional[float] = None) -> Optional[float]:
    """Return a passed argument cast as a float or None.

    Checks the `name` parameter of the request if it contains a valid
    float value. If not, `None` is returned."""

    arg = default_arg(request, key, default)

    if arg is default:
        return arg

    try:
        return float(arg)
    except (ValueError, TypeError):
        logger.warning("Failed to convert '{}' to float.".format(arg))
        return default
Return a passed argument cast as a float or None.

    Checks the `name` parameter of the request if it contains a valid
    float value. If not, `None` is returned.
Return a passed argument cast as a float or None.
Checks the `name` parameter of the request if it contains a valid
float value. If not, `None` is returned.
Return a passed argument cast as a float or None . Checks the ` name ` parameter of the request if it contains a valid float value . If not ` None ` is returned .
def float_arg(request: Request,
              key: Text,
              default: Optional[float] = None) -> Optional[float]:
    arg = default_arg(request, key, default)
    if arg is default:
        return arg
    try:
        return float(arg)
    except (ValueError, TypeError):
        logger.warning("Failed to convert '{}' to float.".format(arg))
        return default
def float_arg ( request : Request , key : Text , default : Optional [ float ] = None ) -> Optional [ float ] : arg = default_arg ( request , key , default ) if arg is default : return arg try : return float ( arg ) except ( ValueError , TypeError ) : logger . warning ( "Failed to convert '{}' to float." . format ( arg ) ) return default
Return a passed argument cast as a float or None.
Return a passed argument cast as a float or None .
"""Return a passed argument cast as a float or None.

    Checks the `name` parameter of the request if it contains a valid
    float value. If not, `None` is returned."""
request
Request
key
Text
default
Optional[float]