Merge pull request #2750 from kwagyeman/kwabena/fix_typo

modules/py_helper: Fix error arg_to_image error message typo.
This commit is contained in:
Ibrahim Abdelkader 2025-07-05 18:04:41 +03:00 committed by GitHub
commit d7e6ffd0fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,7 +64,7 @@ image_t *py_helper_arg_to_image(const mp_obj_t arg, uint32_t flags) {
} else if ((flags & ARG_IMAGE_UNCOMPRESSED) && image->is_compressed) { } else if ((flags & ARG_IMAGE_UNCOMPRESSED) && image->is_compressed) {
mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("Expected an uncompressed image")); mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("Expected an uncompressed image"));
} else if ((flags & ARG_IMAGE_GRAYSCALE) && image->pixfmt != PIXFORMAT_GRAYSCALE) { } else if ((flags & ARG_IMAGE_GRAYSCALE) && image->pixfmt != PIXFORMAT_GRAYSCALE) {
mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("Expected an uncompressed image")); mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("Expected a grayscale image"));
} }
} }
return image; return image;