merge two messages

This commit is contained in:
Jeff Epler 2022-11-08 14:37:32 -06:00
parent 6ac2022093
commit f652a898e7
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE

View File

@ -239,7 +239,7 @@ mp_obj_t mp_arg_validate_type(mp_obj_t obj, const mp_obj_type_t *type, qstr arg_
mp_obj_t mp_arg_validate_type_string(mp_obj_t obj, qstr arg_name) {
if (!mp_obj_is_str(obj)) {
mp_raise_TypeError_varg(translate("%q must be a string"), arg_name);
mp_raise_TypeError_varg(translate("%q must be of type %q"), arg_name, MP_QSTR_str);
}
return obj;
}
@ -247,7 +247,7 @@ mp_obj_t mp_arg_validate_type_string(mp_obj_t obj, qstr arg_name) {
mp_int_t mp_arg_validate_type_int(mp_obj_t obj, qstr arg_name) {
mp_int_t an_int;
if (!mp_obj_get_int_maybe(obj, &an_int)) {
mp_raise_TypeError_varg(translate("%q must be an int"), arg_name);
mp_raise_TypeError_varg(translate("%q must be of type %q"), arg_name, MP_QSTR_int);
}
return an_int;
}