Skip to content

Commit f652a89

Browse files
committed
merge two messages
1 parent 6ac2022 commit f652a89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

py/argcheck.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,15 +239,15 @@ mp_obj_t mp_arg_validate_type(mp_obj_t obj, const mp_obj_type_t *type, qstr arg_
239239

240240
mp_obj_t mp_arg_validate_type_string(mp_obj_t obj, qstr arg_name) {
241241
if (!mp_obj_is_str(obj)) {
242-
mp_raise_TypeError_varg(translate("%q must be a string"), arg_name);
242+
mp_raise_TypeError_varg(translate("%q must be of type %q"), arg_name, MP_QSTR_str);
243243
}
244244
return obj;
245245
}
246246

247247
mp_int_t mp_arg_validate_type_int(mp_obj_t obj, qstr arg_name) {
248248
mp_int_t an_int;
249249
if (!mp_obj_get_int_maybe(obj, &an_int)) {
250-
mp_raise_TypeError_varg(translate("%q must be an int"), arg_name);
250+
mp_raise_TypeError_varg(translate("%q must be of type %q"), arg_name, MP_QSTR_int);
251251
}
252252
return an_int;
253253
}

0 commit comments

Comments
 (0)