From f652a898e78d0a6f0fe7963c86891771d09652df Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 8 Nov 2022 14:37:32 -0600 Subject: [PATCH] merge two messages --- py/argcheck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/argcheck.c b/py/argcheck.c index c28c577088..9ec21d4898 100644 --- a/py/argcheck.c +++ b/py/argcheck.c @@ -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; }