def _keyval_parser_dict() -> Dict[Any, Callable]: return { INTEGER: int, FLOAT: float, STRING: lambda x: STRING.match(x).group(1), CLASS_NAME: _parse_class_name, OBJECT_REF: lambda x: ObjectRef(OBJECT_REF.match(x).group(1)), LIST: _parse_list, TUPLE: _parse_tuple }
def _keyval_parser_dict() -> Dict[Any, Callable]: return { INTEGER: lambda x, _: int(x), FLOAT: lambda x, _: float(x), STRING: _parse_string, VAR_REF: lambda x, vars_dict: vars_dict[get_first_match(VAR_REF, x)], CLASS_NAME: _parse_class_name, OBJECT_REF: lambda x, _: ObjectRef(get_first_match(OBJECT_REF, x)), LIST: _parse_list, TUPLE: _parse_tuple }
def _keyval_parser_dict() -> Dict[Any, Callable]: return { INTEGER: lambda x, _: int(x), FLOAT: lambda x, _: float(x), STRING: lambda x, vars_dict: STRING.match(x).group(1).format(**vars_dict), VAR_REF: lambda x, vars_dict: vars_dict[VAR_REF.match(x).group(1)], CLASS_NAME: _parse_class_name, OBJECT_REF: lambda x, _: ObjectRef(OBJECT_REF.match(x).group(1)), LIST: _parse_list, TUPLE: _parse_tuple }