diff --git a/python/port/mod/matplotlib/pyplot/modpyplot.cpp b/python/port/mod/matplotlib/pyplot/modpyplot.cpp index e8bfff604..4381c2520 100644 --- a/python/port/mod/matplotlib/pyplot/modpyplot.cpp +++ b/python/port/mod/matplotlib/pyplot/modpyplot.cpp @@ -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)) {