[python] Turn a warning into a error when appropriate

This commit is contained in:
Romain Goyet
2020-04-10 16:16:16 -04:00
committed by EmilieNumworks
parent cbb0110c2f
commit 56f4b275a5

View File

@@ -114,7 +114,11 @@ mp_obj_t modpyplot_axis(size_t n_args, const mp_obj_t *args) {
} else {
mp_raise_ValueError("Unrecognized string given to axis; try 'on', 'off' or 'auto'");
}
#warning Use mp_obj_is_bool when upgrading uPy
#if MICROPY_OBJ_IMMEDIATE_OBJS
/* This couldn't be done at the time of writing because mp_obj_is_bool didn't
* exist just yet. */
#error Use mp_obj_is_bool instead of mp_obj_is_type
#endif
} else if (mp_obj_is_type(arg, &mp_type_bool)) {
sPlotStore->setAxesRequested(mp_obj_is_true(arg));
} else if (mp_obj_is_type(arg, &mp_type_tuple) || mp_obj_is_type(arg, &mp_type_list)) {