(parameters: dict, callable)
return casted_parameters
Cast parameters into the type hints provided by callable's function signature.

    Will resolve functions which have been wrapped using itertools.wrap()
Cast parameters into the type hints provided by callable's function signature.
Cast parameters into the type hints provided by callable s function signature .
def cast_to_signature(parameters: dict, callable) -> dict:
    """Cast parameters into the type hints provided by callable's function signature.

    Will resolve functions which have been wrapped using itertools.wrap()
    """
    casted_parameters = parameters.copy()
    for key, hint in get_type_hints(callable).items():
        if key not in casted_parameters:
            continue

        casted_parameters[key] = cast_to_hint(value=casted_parameters[key], hint=hint)

    return casted_parameters
def cast_to_signature ( parameters : dict , callable ) -> dict : casted_parameters = parameters . copy ( ) for key , hint in get_type_hints ( callable ) . items ( ) : if key not in casted_parameters : continue casted_parameters [ key ] = cast_to_hint ( value = casted_parameters [ key ] , hint = hint ) return casted_parameters